From c86c09b19a7db3749c2c43a9fa964aa45ac13af1 Mon Sep 17 00:00:00 2001 From: Philipp Krones Date: Mon, 10 Feb 2020 16:42:50 +0100 Subject: [PATCH] Use current_dir instead of cargo_metadata Co-Authored-By: lzutao --- tests/cargo/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/cargo/mod.rs b/tests/cargo/mod.rs index 5f06a97d3e9..3c385343f70 100644 --- a/tests/cargo/mod.rs +++ b/tests/cargo/mod.rs @@ -1,4 +1,3 @@ -use cargo_metadata::MetadataCommand; use lazy_static::lazy_static; use std::env; use std::path::PathBuf; @@ -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 = {