check for multiple files in KUBECONFIG variable

Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
pull/682/head
Somtochi Onyekwere 4 years ago
parent 1331f5260a
commit 604773e866

@ -67,7 +67,7 @@ const (
func ExecKubectlCommand(ctx context.Context, mode ExecMode, kubeConfigPath string, kubeContext string, args ...string) (string, error) {
var stdoutBuf, stderrBuf bytes.Buffer
if kubeConfigPath != "" {
if kubeConfigPath != "" && len(filepath.SplitList(kubeConfigPath)) == 1 {
args = append(args, "--kubeconfig="+kubeConfigPath)
}

Loading…
Cancel
Save