We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ac8ae00 + 01847fb commit 8242ba9Copy full SHA for 8242ba9
build.rs
@@ -11,11 +11,16 @@
11
use std::env;
12
use std::fs::File;
13
use std::io::Write;
14
-use std::path::PathBuf;
+use std::path::{Path, PathBuf};
15
use std::process::Command;
16
17
fn main() {
18
- println!("cargo:rerun-if-changed=.git/HEAD");
+ // Only check .git/HEAD dirty status if it exists - doing so when
19
+ // building dependent crates may lead to false positives and rebuilds
20
+ if Path::new(".git/HEAD").exists() {
21
+ println!("cargo:rerun-if-changed=.git/HEAD");
22
+ }
23
+
24
println!("cargo:rerun-if-env-changed=CFG_RELEASE_CHANNEL");
25
26
let out_dir = PathBuf::from(env::var_os("OUT_DIR").unwrap());
0 commit comments