mirror of
https://github.com/fluxcd/flux2.git
synced 2025-10-28 23:14:48 +08:00
check for multiple files in KUBECONFIG variable
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user