Skip to content

Commit c0a22e1

Browse files
Merge pull request #18 from christianh814/fix/config-option-hidden-run
fixed the issue where the config command is hidden on all commands wh…
2 parents a4a4c97 + be4b7c3 commit c0a22e1

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

cmd/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var KubeConfig string
2929
// rootCmd represents the base command when called without any subcommands
3030
var rootCmd = &cobra.Command{
3131
Use: "bekind",
32-
Version: "v0.4.4",
32+
Version: "v0.4.5",
3333
Short: "Installs an opinionated KIND cluster",
3434
Long: `This command installs a KIND cluster.
3535
The KIND cluster is then configured based on what configuration file is passed.`,

cmd/run.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,10 @@ func init() {
108108
// Mark profile-dir flag and config flag as mutually exclusive
109109
runCmd.MarkFlagsMutuallyExclusive("profile-dir", "config")
110110

111-
// Mark the config flag as hidden as it doesn't make sense to use it with the run command
112-
runCmd.Flags().MarkHidden("config")
111+
// Mark the config flag as hidden for this command only as it doesn't make sense to use it with the run command
112+
if configFlag := runCmd.Flags().Lookup("config"); configFlag != nil {
113+
configFlag.Hidden = true
114+
}
113115
}
114116

115117
// profileValidArgs returns a list of profiles for tab completion

0 commit comments

Comments
 (0)