Skip to content

Commit 645fc48

Browse files
committedApr 26, 2024
fix: honor --no-warn and --switch-context flags when running commands
Signed-off-by: Russell Centanni <[email protected]>
1 parent 847ada8 commit 645fc48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎cmd/run.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ func (cmd *RunCmd) LoadCommandsConfig(f factory.Factory, configLoader loader.Con
254254
if client != nil {
255255
// If the current kube context or namespace is different than old,
256256
// show warnings and reset kube client if necessary
257-
client, err = kubectl.CheckKubeContext(client, localCache, false, false, false, log)
257+
client, err = kubectl.CheckKubeContext(client, localCache, cmd.NoWarn, cmd.SwitchContext, false, log)
258258
if err != nil {
259259
log.Debugf("Unable to verify kube context %v", err)
260260
client = nil

0 commit comments

Comments
 (0)