Skip to content

Commit a537f91

Browse files
authored
Merge pull request #91 from oli-obk/target_dir
Prefer the `CARGO_TARGET_DIR` env var over the local directory.
2 parents aa60061 + 232ca2d commit a537f91

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)