mirror of
https://github.com/nushell/nushell
synced 2025-01-16 07:04:09 +00:00
Signed-off-by: nibon7 <nibon7@163.com>
This commit is contained in:
parent
b69cda9e07
commit
82b6300dcb
1 changed files with 7 additions and 2 deletions
|
@ -246,10 +246,15 @@ pub fn root() -> PathBuf {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn binaries() -> PathBuf {
|
pub fn binaries() -> PathBuf {
|
||||||
|
let mut build_type = "debug";
|
||||||
|
if !cfg!(debug_assertions) {
|
||||||
|
build_type = "release"
|
||||||
|
}
|
||||||
|
|
||||||
std::env::var("CARGO_TARGET_DIR")
|
std::env::var("CARGO_TARGET_DIR")
|
||||||
.ok()
|
.ok()
|
||||||
.map(|target_dir| PathBuf::from(target_dir).join("debug"))
|
.map(|target_dir| PathBuf::from(target_dir).join(&build_type))
|
||||||
.unwrap_or_else(|| root().join("target/debug"))
|
.unwrap_or_else(|| root().join(format!("target/{}", &build_type)))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn fixtures() -> PathBuf {
|
pub fn fixtures() -> PathBuf {
|
||||||
|
|
Loading…
Reference in a new issue