Use current_dir instead of cargo_metadata
Co-Authored-By: lzutao <taolzu@gmail.com>
This commit is contained in:
parent
f940b04de6
commit
c86c09b19a
@ -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 = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user