Skip to content

Commit

Permalink
fix broken error output in shell cmd after introducing alias feature
Browse files Browse the repository at this point in the history
  • Loading branch information
sagan committed Jan 9, 2024
1 parent a615bbe commit 7707dc3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/shell/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ func shell(command *cobra.Command, args []string) error {
return fmt.Errorf("--fork or --lock flag can NOT be used with shell")
}
config.InShell = true
cmd.RootCmd.SilenceErrors = false
defer func() {
config.InShell = false
cmd.RootCmd.SilenceErrors = true
}()
ptoolPrompt.GoPromptOptions = append(ptoolPrompt.GoPromptOptions,
prompt.OptionMaxSuggestion(uint16(config.Get().ShellMaxSuggestions)))
history, err := cmd.ShellHistory.Load()
Expand Down

0 comments on commit 7707dc3

Please sign in to comment.