Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

patch executeMultipleCommandWithEnvs when no /bin/zsh

Maidul Islam0413059fbe28
diff --git a/cli/packages/cmd/run.go b/cli/packages/cmd/run.go
index dd1b492e5c..4c7c9782f4 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)