Skip to content

Commit 232ca2d

Browse files
committed
Prefer the CARGO_TARGET_DIR env var over the local directory.
1 parent 571e0a7 commit 232ca2d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/config.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ impl Config {
8282
dependencies_crate_manifest_path: None,
8383
dependency_builder: CommandBuilder::cargo(),
8484
num_test_threads: std::thread::available_parallelism().unwrap(),
85-
out_dir: std::env::current_dir().unwrap().join("target/ui"),
85+
out_dir: std::env::var_os("CARGO_TARGET_DIR")
86+
.map(PathBuf::from)
87+
.unwrap_or_else(|| std::env::current_dir().unwrap().join("target"))
88+
.join("ui"),
8689
edition: Some("2021".into()),
8790
}
8891
}

0 commit comments

Comments
 (0)