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:
		@ -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())
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user