Skip to content

Commit

Permalink
Merge pull request #91 from oli-obk/target_dir
Browse files Browse the repository at this point in the history
Prefer the `CARGO_TARGET_DIR` env var over the local directory.
  • Loading branch information
oli-obk authored Jun 29, 2023
2 parents aa60061 + 232ca2d commit a537f91
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ impl Config {
dependencies_crate_manifest_path: None,
dependency_builder: CommandBuilder::cargo(),
num_test_threads: std::thread::available_parallelism().unwrap(),
out_dir: std::env::current_dir().unwrap().join("target/ui"),
out_dir: std::env::var_os("CARGO_TARGET_DIR")
.map(PathBuf::from)
.unwrap_or_else(|| std::env::current_dir().unwrap().join("target"))
.join("ui"),
edition: Some("2021".into()),
}
}
Expand Down

0 comments on commit a537f91

Please sign in to comment.