diff --git a/cobra/cmd/root.go b/cobra/cmd/root.go index 51bba2cc..cad3f451 100644 --- a/cobra/cmd/root.go +++ b/cobra/cmd/root.go @@ -74,6 +74,6 @@ func initConfig() { viper.AutomaticEnv() if err := viper.ReadInConfig(); err == nil { - fmt.Println("Using config file:", viper.ConfigFileUsed()) + fmt.Fprintln(os.Stderr, "Using config file:", viper.ConfigFileUsed()) } }