diff options
author | nibon7 <nibon7@163.com> | 2022-02-22 21:08:49 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-22 13:08:49 +0000 |
commit | 8ea6c3bc523f5024271d8a58f689a3a91b8f6fca (patch) | |
tree | 9050b898e9b19fd86e68ad7841b57c9f194e81a4 | |
parent | 36e981ad4b809f743e36c699f28075a13fdc4cc7 (diff) | |
download | alacritty-8ea6c3bc523f5024271d8a58f689a3a91b8f6fca.tar.gz alacritty-8ea6c3bc523f5024271d8a58f689a3a91b8f6fca.zip |
Omit git version hash when git command fails
-rw-r--r-- | alacritty/build.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/alacritty/build.rs b/alacritty/build.rs index e81da150..0874f88c 100644 --- a/alacritty/build.rs +++ b/alacritty/build.rs @@ -28,6 +28,7 @@ fn commit_hash() -> Option<String> { .args(&["rev-parse", "--short", "HEAD"]) .output() .ok() + .filter(|output| output.status.success()) .and_then(|output| String::from_utf8(output.stdout).ok()) .map(|hash| hash.trim().into()) } |