Skip to content

Commit

Permalink
Use current_dir instead of cargo_metadata
Browse files Browse the repository at this point in the history
Co-Authored-By: lzutao <[email protected]>
  • Loading branch information
flip1995 and tesuji authored Feb 10, 2020
1 parent f940b04 commit c86c09b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/cargo/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use cargo_metadata::MetadataCommand;
use lazy_static::lazy_static;
use std::env;
use std::path::PathBuf;
Expand All @@ -7,7 +6,7 @@ lazy_static! {
pub static ref CARGO_TARGET_DIR: PathBuf = {
match env::var_os("CARGO_TARGET_DIR") {
Some(v) => v.into(),
None => MetadataCommand::new().exec().unwrap().target_directory,
None => env::current_dir().unwrap().join("target"),
}
};
pub static ref TARGET_LIB: PathBuf = {
Expand Down

0 comments on commit c86c09b

Please sign in to comment.