Create target/ if it doesn't exist yet

This commit is contained in:
Michael Vines
2018-11-09 11:36:01 -08:00
committed by Grimes
parent aa741b3147
commit 9a30100a9c

View File

@@ -8,7 +8,7 @@ fn main() {
// Ensure target/perf-libs/ exists. It's been observed that
// a cargo:rerun-if-changed= directive with a non-existent
// directory triggers a rebuild on every |cargo build| invocation
fs::create_dir("target/perf-libs").unwrap_or_else(|err| {
fs::create_dir_all("target/perf-libs").unwrap_or_else(|err| {
if err.kind() != std::io::ErrorKind::AlreadyExists {
panic!("Unable to create target/perf-libs: {:?}", err);
}