mirror of
https://github.com/nushell/nushell.git
synced 2025-04-24 13:18:18 +02:00
fix(test-support): use CARGO_BUILD_TARGET_DIR env var (#15212)
# Description cargo uses both CARGO_BUILD_TARGET_DIR and CARGO_TARGET_DIR, so check for CARGO_BUILD_TARGET_DIR if CARGO_TARGET_DIR is not found https://doc.rust-lang.org/cargo/reference/config.html#buildtarget-dir
This commit is contained in:
parent
52a35827c7
commit
93612974e0
@ -88,6 +88,7 @@ pub fn binaries() -> AbsolutePathBuf {
|
|||||||
};
|
};
|
||||||
|
|
||||||
std::env::var("CARGO_TARGET_DIR")
|
std::env::var("CARGO_TARGET_DIR")
|
||||||
|
.or_else(|_| std::env::var("CARGO_BUILD_TARGET_DIR"))
|
||||||
.ok()
|
.ok()
|
||||||
.and_then(|p| AbsolutePathBuf::try_from(p).ok())
|
.and_then(|p| AbsolutePathBuf::try_from(p).ok())
|
||||||
.unwrap_or_else(|| root().join("target"))
|
.unwrap_or_else(|| root().join("target"))
|
||||||
|
Loading…
Reference in New Issue
Block a user