mirror of
https://github.com/alacritty/alacritty.git
synced 2026-11-29 16:40:49 +03:00
Omit git version hash when git command fails
This commit is contained in:
1 parent
36e981ad4b
commit
8ea6c3bc52
1 file changed
+1
@@ -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())
|
||||
}
|
||||
Reference in new issue
Block a user