Use env::var_os to read paths from the environment

This avoids unnecessary UTF-8 validation on OsStrings that we just pass
back to the OS.
This commit is contained in:
Matt Brubeck 2017-10-20 09:03:21 -07:00
parent fe16c1d5c3
commit c169f52b25
7 changed files with 19 additions and 18 deletions

View file

@ -69,7 +69,7 @@ fn generate_properties() {
}
}
let script = Path::new(&env::var("CARGO_MANIFEST_DIR").unwrap())
let script = Path::new(&env::var_os("CARGO_MANIFEST_DIR").unwrap())
.join("properties").join("build.py");
let product = if cfg!(feature = "gecko") { "gecko" } else { "servo" };
let status = Command::new(&*PYTHON)