Merge pull request #831 from silvin-lubecki/fix-kubernetes-flags

Fix broken Kubernetes stack flags
This commit is contained in:
Sebastiaan van Stijn 2018-01-24 10:45:45 -08:00 committed by GitHub
commit f9039fe291
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -27,15 +27,15 @@ func WrapCli(dockerCli command.Cli, cmd *cobra.Command) (*KubeCli, error) {
Cli: dockerCli, Cli: dockerCli,
kubeNamespace: "default", kubeNamespace: "default",
} }
if cmd.PersistentFlags().Changed("namespace") { if cmd.Flags().Changed("namespace") {
cli.kubeNamespace, err = cmd.PersistentFlags().GetString("namespace") cli.kubeNamespace, err = cmd.Flags().GetString("namespace")
if err != nil { if err != nil {
return nil, err return nil, err
} }
} }
kubeConfig := "" kubeConfig := ""
if cmd.PersistentFlags().Changed("kubeconfig") { if cmd.Flags().Changed("kubeconfig") {
kubeConfig, err = cmd.PersistentFlags().GetString("kubeconfig") kubeConfig, err = cmd.Flags().GetString("kubeconfig")
if err != nil { if err != nil {
return nil, err return nil, err
} }