fix(codex): propagate extended PATH to codex subprocess (#6874)

Signed-off-by: RamXX <ramxx@ramirosalas.com>
This commit is contained in:
Ramiro Salas
2026-02-06 08:20:49 -08:00
committed by GitHub
parent 14a9d1e61e
commit 3324711c96
+7
View File
@@ -157,6 +157,13 @@ impl CodexProvider {
let mut cmd = Command::new(&self.command);
configure_command_no_window(&mut cmd);
// Propagate extended PATH so the codex subprocess can find Node.js
// and other dependencies (especially when launched from the desktop app
// where the inherited PATH is limited).
if let Ok(path) = SearchPaths::builder().with_npm().path() {
cmd.env("PATH", path);
}
// Use 'exec' subcommand for non-interactive mode
cmd.arg("exec");