Skip to content

Commit 6283169

Browse files
committed
Paths are relative to CARGO_MANIFEST_DIR
The cwd is different for workspaces, so use the manifest env var instead.
1 parent b762948 commit 6283169

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/backend/src/encode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl Interner {
4343
map: RefCell::new(HashMap::new()),
4444
strings: RefCell::new(HashSet::new()),
4545
files: RefCell::new(HashMap::new()),
46-
root: env::current_dir().unwrap(),
46+
root: env::var_os("CARGO_MANIFEST_DIR").unwrap().into(),
4747
crate_name: env::var("CARGO_PKG_NAME").unwrap(),
4848
}
4949
}

0 commit comments

Comments
 (0)