Skip to content
Myr

Fix invalid shell completion when used with ~/.cobra.yaml (#1510)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

`cobra completion` outputs invalid output "Using config file:" at the top of the completion script. when ~/.cobra.yaml exists.

authored by darklore · committed by GitHub · parent 3fed3ef · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:cobra/cmd/root.go+1 added-1 removed
72 unmodified lines
7374 viper.AutomaticEnv()7576 if err := viper.ReadInConfig(); err == nil {77 fmt.Println("Using config file:", viper.ConfigFileUsed())77 fmt.Fprintln(os.Stderr, "Using config file:", viper.ConfigFileUsed())78 }79}