Skip to content

Commit 742ce0e

Browse files
authored
Merge pull request #3596 from olamilekan000/fix-kconfig-variable-when-attaching-ws-commands
fix bug when running ws command with kubeconfig flags
2 parents 78aca05 + 449e05a commit 742ce0e

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

cli/pkg/base/options.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,7 @@ func (o *Options) Complete() error {
7575
loadingRules := clientcmd.NewDefaultClientConfigLoadingRules()
7676
loadingRules.ExplicitPath = o.Kubeconfig
7777

78-
startingConfig, err := loadingRules.GetStartingConfig()
79-
if err != nil {
80-
return err
81-
}
82-
83-
o.ClientConfig = clientcmd.NewDefaultClientConfig(*startingConfig, o.KubectlOverrides)
78+
o.ClientConfig = clientcmd.NewNonInteractiveDeferredLoadingClientConfig(loadingRules, o.KubectlOverrides)
8479
}
8580

8681
return nil

0 commit comments

Comments
 (0)