Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

[18.02] Using Flags instead of PersistentFlags, as Kubernetes flags seem not … #410

Merged
merged 1 commit into from
Jan 31, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions components/cli/cli/command/stack/kubernetes/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down