Paths are relative to CARGO_MANIFEST_DIR

The cwd is different for workspaces, so use the manifest env var
instead.
This commit is contained in:
Alex Crichton 2019-02-26 08:30:33 -08:00
parent b762948456
commit 6283169a30

View File

@ -43,7 +43,7 @@ impl Interner {
map: RefCell::new(HashMap::new()),
strings: RefCell::new(HashSet::new()),
files: RefCell::new(HashMap::new()),
root: env::current_dir().unwrap(),
root: env::var_os("CARGO_MANIFEST_DIR").unwrap().into(),
crate_name: env::var("CARGO_PKG_NAME").unwrap(),
}
}