Skip to content

Commit c86c09b

Browse files
flip1995tesuji
andauthored
Use current_dir instead of cargo_metadata
Co-Authored-By: lzutao <[email protected]>
1 parent f940b04 commit c86c09b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/cargo/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use cargo_metadata::MetadataCommand;
21
use lazy_static::lazy_static;
32
use std::env;
43
use std::path::PathBuf;
@@ -7,7 +6,7 @@ lazy_static! {
76
pub static ref CARGO_TARGET_DIR: PathBuf = {
87
match env::var_os("CARGO_TARGET_DIR") {
98
Some(v) => v.into(),
10-
None => MetadataCommand::new().exec().unwrap().target_directory,
9+
None => env::current_dir().unwrap().join("target"),
1110
}
1211
};
1312
pub static ref TARGET_LIB: PathBuf = {

0 commit comments

Comments
 (0)