Automatic Merge
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
9dd2c6f54f
Коммит
4b56488fcb
@@ -65,7 +65,14 @@ func Run(args []string) error {
|
||||
}
|
||||
}()
|
||||
|
||||
return RootCmd.Execute()
|
||||
err := RootCmd.Execute()
|
||||
// Flush the printer first before printing any error
|
||||
_ = printer.Flush()
|
||||
if err != nil {
|
||||
_, _ = fmt.Fprintf(os.Stderr, "Error: %s\n", err.Error())
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func printPanic(x any) {
|
||||
@@ -114,8 +121,6 @@ var RootCmd = &cobra.Command{
|
||||
printer.PrintError(fmt.Sprintf("Per page value is greater than the maximum allowed. Mattermost might only return %d items.", MaxPageSize))
|
||||
}
|
||||
},
|
||||
PersistentPostRun: func(cmd *cobra.Command, args []string) {
|
||||
_ = printer.Flush()
|
||||
},
|
||||
SilenceUsage: true,
|
||||
SilenceUsage: true,
|
||||
SilenceErrors: true,
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user