We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c066807 commit f940b04Copy full SHA for f940b04
tests/cargo/mod.rs
@@ -1,3 +1,4 @@
1
+use cargo_metadata::MetadataCommand;
2
use lazy_static::lazy_static;
3
use std::env;
4
use std::path::PathBuf;
@@ -6,7 +7,7 @@ lazy_static! {
6
7
pub static ref CARGO_TARGET_DIR: PathBuf = {
8
match env::var_os("CARGO_TARGET_DIR") {
9
Some(v) => v.into(),
- None => "target".into(),
10
+ None => MetadataCommand::new().exec().unwrap().target_directory,
11
}
12
};
13
pub static ref TARGET_LIB: PathBuf = {
0 commit comments