Skip to content

Commit

Permalink
Fix git hash checks
Browse files Browse the repository at this point in the history
  • Loading branch information
KmolYuan committed Sep 22, 2024
1 parent 6e5a5a7 commit 4ea73f7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions four-bar-ui/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ fn main() {
.args(["rev-parse", "HEAD"])
.output()
{
let hash = String::from_utf8_lossy(&hash.stdout[..7]);
println!("cargo:rustc-env=GIT_HASH={hash}");
if hash.status.success() {
let hash = String::from_utf8_lossy(&hash.stdout[..7]);
println!("cargo:rustc-env=GIT_HASH={hash}");
}
}
#[cfg(windows)]
{
Expand Down

0 comments on commit 4ea73f7

Please sign in to comment.