Skip to content

Commit 94a3203

Browse files
committed
don't emit rerun-if-changed unless the path exists and is readable
1 parent 3439059 commit 94a3203

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

openssl-sys/build/main.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ fn main() {
8484
// every time when vendoring so we disable it.
8585
#[cfg(not(feature = "vendored"))]
8686
if let Some(printable_include) = include_dir.join("openssl").to_str() {
87-
println!("cargo:rerun-if-changed={}", printable_include);
87+
if include_dir.join("openssl").exists() {
88+
println!("cargo:rerun-if-changed={}", printable_include);
89+
}
8890
}
8991

9092
if !lib_dirs.iter().all(|p| p.exists()) {

0 commit comments

Comments
 (0)