forked from TrueCloudLab/frostfs-node
[#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:
parent
6c08ec9ca2
commit
f1e91313db
1 changed files with 4 additions and 0 deletions
|
@ -2,6 +2,7 @@ package modules
|
|||
|
||||
import (
|
||||
"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/morph"
|
||||
|
@ -30,6 +31,9 @@ func init() {
|
|||
// we need to init viper config to bind viper and cobra configurations for
|
||||
// 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.Flags().Bool("version", false, "application version")
|
||||
|
||||
|
|
Loading…
Reference in a new issue