diff --git a/hive-bash-mcp/src/runner.rs b/hive-bash-mcp/src/runner.rs index 48b15012..95bc833c 100644 --- a/hive-bash-mcp/src/runner.rs +++ b/hive-bash-mcp/src/runner.rs @@ -762,7 +762,15 @@ async fn exec_cmd( // `kill` and the timeout would have nothing left to act on. let stdout_file = std::fs::File::create(out_path)?; let stderr_file = std::fs::File::create(err_path)?; - let mut cmd_builder = Command::new("/usr/bin/env"); + // + // Where `/usr/bin/env` does not exist (the nix build sandbox, which the + // tests run in, has only `/bin/sh`), `env` is looked up on PATH instead. + let env = if Path::new("/usr/bin/env").exists() { + "/usr/bin/env" + } else { + "env" + }; + let mut cmd_builder = Command::new(env); cmd_builder .arg("bash") .arg("-c")