Skip to content

Commit

Permalink
Merge pull request #682 from SomtochiAma/multiple-config-files
Browse files Browse the repository at this point in the history
Check for multiple files in KUBECONFIG variable
  • Loading branch information
stefanprodan authored Jan 12, 2021
2 parents 1331f52 + 604773e commit 9da427a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 9da427a

Please sign in to comment.