diff --git a/components/style/build.rs b/components/style/build.rs index 9a3d0169c24..607f895c297 100644 --- a/components/style/build.rs +++ b/components/style/build.rs @@ -69,7 +69,8 @@ fn generate_properties() { } } - let script = Path::new(file!()).parent().unwrap().join("properties").join("build.py"); + let script = Path::new(&env::var("CARGO_MANIFEST_DIR").unwrap()) + .join("properties").join("build.py"); let product = if cfg!(feature = "gecko") { "gecko" } else { "servo" }; let status = Command::new(&*PYTHON) .arg(&script)