Skip to content

Commit

Permalink
Fix invalid shell completion when used with ~/.cobra.yaml (#1510)
Browse files Browse the repository at this point in the history
`cobra completion` outputs invalid output "Using config file:" at the
top of the completion script. when ~/.cobra.yaml exists.
  • Loading branch information
darklore committed Dec 7, 2021
1 parent 3fed3ef commit 25bab5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cobra/cmd/root.go
Expand Up @@ -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())
}
}

0 comments on commit 25bab5a

Please sign in to comment.