Skip to content

Commit 5c99129

Browse files
committed
Absolutise fallback path
1 parent 07b3447 commit 5c99129

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tools/upstream_wrapper/src/main.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ fn main() {
2020
}
2121
Ok(path)
2222
})
23-
.unwrap_or(PathBuf::from(WRAPPED_TOOL_ROOTPATH));
23+
.unwrap_or_else(|| {
24+
std::env::current_dir()
25+
.expect("Failed to get current directory")
26+
.join(WRAPPED_TOOL_ROOTPATH)
27+
});
2428

2529
if !wrapped_tool_path.exists() {
2630
panic!(
@@ -39,7 +43,7 @@ fn main() {
3943

4044
let working_directory = std::env::var_os("BUILD_WORKING_DIRECTORY")
4145
.map(PathBuf::from)
42-
.unwrap_or_else(|| std::env::current_dir().expect("Failed to get working directory"));
46+
.unwrap_or_else(|| std::env::current_dir().expect("Failed to get build working directory"));
4347

4448
let mut command = Command::new(wrapped_tool_path);
4549
command

0 commit comments

Comments
 (0)