[#1311] neofs-adm: Set stdout as default output

Cobra `Command` prints to stderr by default.
`neofs-cli` already sets the output properly.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-04-12 11:23:14 +03:00 committed by Alex Vanin
parent 6c08ec9ca2
commit f1e91313db

View file

@ -2,6 +2,7 @@ package modules
import ( import (
"fmt" "fmt"
"os"
"github.com/nspcc-dev/neofs-node/cmd/neofs-adm/internal/modules/config" "github.com/nspcc-dev/neofs-node/cmd/neofs-adm/internal/modules/config"
"github.com/nspcc-dev/neofs-node/cmd/neofs-adm/internal/modules/morph" "github.com/nspcc-dev/neofs-node/cmd/neofs-adm/internal/modules/morph"
@ -30,6 +31,9 @@ func init() {
// we need to init viper config to bind viper and cobra configurations for // we need to init viper config to bind viper and cobra configurations for
// rpc endpoint, alphabet wallet dir, key credentials, etc. // rpc endpoint, alphabet wallet dir, key credentials, etc.
// use stdout as default output for cmd.Print()
rootCmd.SetOut(os.Stdout)
rootCmd.PersistentFlags().StringP(configFlag, "c", "", "config file") rootCmd.PersistentFlags().StringP(configFlag, "c", "", "config file")
rootCmd.Flags().Bool("version", false, "application version") rootCmd.Flags().Bool("version", false, "application version")