mirror of https://github.com/kubernetes/kops.git
Merge pull request #2555 from rdtr/unset_default_state_value_on_docs_creation
Fixes 2502: unset default value of state flag when docs are generated
This commit is contained in:
commit
942142f96c
|
@ -50,8 +50,10 @@ func init() {
|
||||||
|
|
||||||
func (c *GenHelpDocsCmd) Run() error {
|
func (c *GenHelpDocsCmd) Run() error {
|
||||||
rootCommand.cobraCommand.DisableAutoGenTag = true
|
rootCommand.cobraCommand.DisableAutoGenTag = true
|
||||||
rootCommand.RegistryPath = ""
|
|
||||||
err := doc.GenMarkdownTree(rootCommand.cobraCommand, c.OutDir)
|
|
||||||
|
|
||||||
return err
|
// unset KOPS_STATE_STORE from default value
|
||||||
|
for _, c := range rootCommand.cobraCommand.Commands() {
|
||||||
|
c.Flag("state").DefValue = ""
|
||||||
|
}
|
||||||
|
return doc.GenMarkdownTree(rootCommand.cobraCommand, c.OutDir)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue