From ad74a014919653a09897dba8e0b8e5e4f4bf4bd3 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 10 Feb 2023 15:09:27 +1000 Subject: [PATCH] Fix yarn install failing if node binary unavailable The paths we were using were relative, and were breaking if cwd is changed. --- build/runner/src/build.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build/runner/src/build.rs b/build/runner/src/build.rs index 9a226fa49..1471dfae6 100644 --- a/build/runner/src/build.rs +++ b/build/runner/src/build.rs @@ -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() ) };