mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-25 09:01:48 +00:00
check for multiple files in KUBECONFIG variable
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
This commit is contained in:
parent
1331f5260a
commit
604773e866
1 changed files with 1 additions and 1 deletions
|
|
@ -67,7 +67,7 @@ const (
|
||||||
func ExecKubectlCommand(ctx context.Context, mode ExecMode, kubeConfigPath string, kubeContext string, args ...string) (string, error) {
|
func ExecKubectlCommand(ctx context.Context, mode ExecMode, kubeConfigPath string, kubeContext string, args ...string) (string, error) {
|
||||||
var stdoutBuf, stderrBuf bytes.Buffer
|
var stdoutBuf, stderrBuf bytes.Buffer
|
||||||
|
|
||||||
if kubeConfigPath != "" {
|
if kubeConfigPath != "" && len(filepath.SplitList(kubeConfigPath)) == 1 {
|
||||||
args = append(args, "--kubeconfig="+kubeConfigPath)
|
args = append(args, "--kubeconfig="+kubeConfigPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue