Fix invalid shell completion when used with ~/.cobra.yaml (#1510)
`cobra completion` outputs invalid output "Using config file:" at the top of the completion script. when ~/.cobra.yaml exists.
This commit is contained in:
parent
3fed3ef5ad
commit
25bab5a398
@ -74,6 +74,6 @@ func initConfig() {
|
|||||||
viper.AutomaticEnv()
|
viper.AutomaticEnv()
|
||||||
|
|
||||||
if err := viper.ReadInConfig(); err == nil {
|
if err := viper.ReadInConfig(); err == nil {
|
||||||
fmt.Println("Using config file:", viper.ConfigFileUsed())
|
fmt.Fprintln(os.Stderr, "Using config file:", viper.ConfigFileUsed())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user