diff --git a/cli/packages/cmd/run.go b/cli/packages/cmd/run.go index dd1b492e5..4c7c9782f 100644 --- a/cli/packages/cmd/run.go +++ b/cli/packages/cmd/run.go @@ -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)