mirror of https://github.com/k3s-io/k3s
do not filter kubectl get pods if -o json or yaml
This patch sets the value of --show-all to true if the output format specified is 'json' or 'yaml'.pull/6/head
parent
1bfd4f0a71
commit
cade00e646
|
@ -187,8 +187,11 @@ func RunGet(f cmdutil.Factory, out, errOut io.Writer, cmd *cobra.Command, args [
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if len(options.Filenames) > 0 || argsHasNames {
|
||||
cmd.Flag("show-all").Value.Set("true")
|
||||
output := cmdutil.GetFlagString(cmd, "output")
|
||||
if len(options.Filenames) > 0 || argsHasNames || output == "json" || output == "yaml" {
|
||||
if !cmd.Flag("show-all").Changed {
|
||||
cmd.Flag("show-all").Value.Set("true")
|
||||
}
|
||||
}
|
||||
export := cmdutil.GetFlagBool(cmd, "export")
|
||||
|
||||
|
|
Loading…
Reference in New Issue