From 49da96d0067a9f93c7162381a06068a7a8554d65 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Thu, 5 Nov 2020 16:49:05 +0300 Subject: [PATCH] [#146] Set stdout as default output for CLI Signed-off-by: Alex Vanin --- cmd/neofs-cli/modules/root.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/neofs-cli/modules/root.go b/cmd/neofs-cli/modules/root.go index b5c5b33d..c90fe0f2 100644 --- a/cmd/neofs-cli/modules/root.go +++ b/cmd/neofs-cli/modules/root.go @@ -62,6 +62,9 @@ func init() { // Cobra supports persistent flags, which, if defined here, // will be global for your application. + // use stdout as default output for cmd.Print() + rootCmd.SetOut(os.Stdout) + rootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "c", "", "config file (default is $HOME/.config/neofs-cli/config.yaml)") rootCmd.PersistentFlags().StringP("key", "k", "", "private key in hex, WIF or filepath (use `--key new` to generate key for request)")