Skip to main content

resolve_shell

Function resolve_shell 

Source
pub fn resolve_shell() -> Result<String, Box<dyn Error>>
Expand description

Resolve the absolute path to bash for sandbox execution.

Always uses bash, not the user’s SHELL. Reason: zsh with env_clear() reads /etc/zshenv which calls path_helper and can reset PATH, causing “command not found” for basic tools like cat/ls. Bash handles minimal environments reliably. The commands inside the sandbox (npm, node, etc.) are unaffected — this only controls the -c wrapper.