Skip to content

Commit 82de96b

Browse files
ivanmatmatioktalz
authored andcommitted
BUG/MINOR: prevent crash in external mode without external option set
1 parent 891f3c6 commit 82de96b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/k8s/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@ func getRestConfig(osArgs utils.OSArgs) (restConfig *rest.Config, err error) {
248248
} else {
249249
restConfig, err = rest.InClusterConfig()
250250
}
251+
if err != nil {
252+
return
253+
}
251254
restConfig.WarningHandler = logger
252255
return restConfig, err
253256
}

0 commit comments

Comments
 (0)