From 14fcadffb137eb673f66669c3f30d7e289553d69 Mon Sep 17 00:00:00 2001 From: Silvin Lubecki Date: Wed, 24 Jan 2018 09:17:08 -0800 Subject: [PATCH] Using Flags instead of PersistentFlags, as Kubernetes flags seem not to be defined in the "persistent space". Signed-off-by: Silvin Lubecki --- cli/command/stack/kubernetes/cli.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/command/stack/kubernetes/cli.go b/cli/command/stack/kubernetes/cli.go index 90a4b71c7877..37f826272f4d 100644 --- a/cli/command/stack/kubernetes/cli.go +++ b/cli/command/stack/kubernetes/cli.go @@ -27,15 +27,15 @@ func WrapCli(dockerCli command.Cli, cmd *cobra.Command) (*KubeCli, error) { Cli: dockerCli, kubeNamespace: "default", } - if cmd.PersistentFlags().Changed("namespace") { - cli.kubeNamespace, err = cmd.PersistentFlags().GetString("namespace") + if cmd.Flags().Changed("namespace") { + cli.kubeNamespace, err = cmd.Flags().GetString("namespace") if err != nil { return nil, err } } kubeConfig := "" - if cmd.PersistentFlags().Changed("kubeconfig") { - kubeConfig, err = cmd.PersistentFlags().GetString("kubeconfig") + if cmd.Flags().Changed("kubeconfig") { + kubeConfig, err = cmd.Flags().GetString("kubeconfig") if err != nil { return nil, err }