Skip to content

Commit 685573a

Browse files
committed
chore: removes useless flags from config command
1 parent dcdba47 commit 685573a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/commands/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ func (e *Executor) initConfig() {
3434
fs := pathCmd.Flags()
3535
fs.SortFlags = false // sort them as they are defined here
3636

37-
initConfigFileFlagSet(fs, &e.cfg.Run)
38-
3937
configCmd.AddCommand(pathCmd)
4038
e.rootCmd.AddCommand(configCmd)
4139
}
@@ -67,6 +65,8 @@ func (e *Executor) getUsedConfig() string {
6765
return prettyUsedConfigFile
6866
}
6967

68+
// --- Related to config but not used directly by the config command.
69+
7070
func initConfigFileFlagSet(fs *pflag.FlagSet, cfg *config.Run) {
7171
fs.StringVarP(&cfg.Config, "config", "c", "", wh("Read config from file path `PATH`"))
7272
fs.BoolVar(&cfg.NoConfig, "no-config", false, wh("Don't read config file"))

0 commit comments

Comments
 (0)