patch executeMultipleCommandWithEnvs when no /bin/zsh

This commit is contained in:
Maidul Islam
2023-01-24 19:58:55 -08:00
parent 65f049f6ac
commit 0413059fbe

View File

@@ -166,7 +166,10 @@ func executeMultipleCommandWithEnvs(fullCommand string, secretsCount int, env []
if runtime.GOOS == "windows" {
shell = [2]string{"cmd", "/C"}
} else {
shell[0] = os.Getenv("SHELL")
currentShell := os.Getenv("SHELL")
if currentShell != "" {
shell[0] = currentShell
}
}
cmd := exec.Command(shell[0], shell[1], fullCommand)