From 8bb810fe7e5b4e1dc9dba1b99a0f35ce7685378f Mon Sep 17 00:00:00 2001 From: Arthur Halet Date: Fri, 29 Sep 2023 16:05:49 +0200 Subject: [PATCH] default output to stdout --- cli/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/main.go b/cli/main.go index e9acab8..0f9e662 100644 --- a/cli/main.go +++ b/cli/main.go @@ -39,8 +39,8 @@ func Start(version, commit, date string) (err error) { }() parser.CommandHandler = func(command flags.Commander, args []string) error { + msg.UseStdout() if cmd, ok := command.(SetClient); ok { - clientConn, err = app.CreateConnFromFile(ExpandConfigPath()) if err != nil { return err @@ -52,6 +52,7 @@ func Start(version, commit, date string) (err error) { } _, err = parser.Parse() if err != nil { + msg.UseStderr() errFlag, isErrFlag := err.(*flags.Error) if isErrFlag && askVersion && errFlag.Type == flags.ErrCommandRequired { return nil