Fix yarn install failing if node binary unavailable

The paths we were using were relative, and were breaking if cwd is
changed.
This commit is contained in:
Damien Elmes 2023-02-10 15:09:27 +10:00
parent 0be31b1b17
commit ad74a01491

View File

@ -31,8 +31,12 @@ pub fn run_build(args: BuildArgs) {
)
} else {
format!(
"out/bin:out/extracted/node/bin:{}",
env::var("PATH").unwrap()
"{br}/bin:{br}/extracted/node/bin:{path}",
br = build_root
.canonicalize_utf8()
.expect("resolving build root")
.as_str(),
path = env::var("PATH").unwrap()
)
};