diff options
| -rw-r--r-- | main.go | 1 | ||||
| -rw-r--r-- | modes.go | 1 | ||||
| -rw-r--r-- | spool/exit.go | 2 |
3 files changed, 3 insertions, 1 deletions
@@ -89,6 +89,7 @@ func mode[T any](list ModeMap[T], fire func(mode T) *spool.ExitCode) *spool.Exit return fire(in) }) if code != nil { + _, _ = spool.Warn("%v\n", code.Message) code.Exit() } return nil @@ -60,6 +60,7 @@ var uninitializedModes = ModeMap[func() *spool.ExitCode]{ // like --version and --completion var statelessModes = ModeMap[func() *spool.ExitCode]{ flags.InstallCompletion: func() *spool.ExitCode { + _ = paths.Component.Init() sh := os.Getenv("SHELL") if sh == "" { return spool.UnknownShellFailure diff --git a/spool/exit.go b/spool/exit.go index 77bff44..e5c6088 100644 --- a/spool/exit.go +++ b/spool/exit.go @@ -25,8 +25,8 @@ var ( NoTargetsFailure = MenuFailure.Next("no targets found") NoEditorFailure = NoTargetsFailure.Next("$EDITOR not set") NoDebugInfo = NoEditorFailure.Next("could not read debug info") - ManFailure = New(120, "failure to generate manual pages") UnknownShellFailure = New(110, "unable to detect shell type through $SHELL") + ManFailure = New(120, "failure to generate manual pages") CompletionAlreadyInstalledFailure = UnknownShellFailure.Next("completion seems already installed") CompletionFailure = CompletionAlreadyInstalledFailure.Next("failed to install completion") ProfilingFailure = CompletionFailure.Next("failed to initialize profiler") |
