Use login shell PATH for extension hooks
Some checks failed
Weekly OSV dependency audit / dependency-audit (push) Failing after 5s

This commit is contained in:
Georg Bauer
2026-08-30 22:40:57 +02:00
parent 6c4e792c8a
commit 32c3a1a47a
2 changed files with 19 additions and 9 deletions

View File

@@ -849,7 +849,7 @@ fn run_hook(
.args(&argv[1..])
.current_dir(&project_root)
.env_clear()
.env("PATH", std::env::var_os("PATH").unwrap_or_default())
.env("PATH", crate::agent::shell_path())
.env("HOME", &home)
.env("TMPDIR", &temporary)
.env("XDG_CONFIG_HOME", &config)