Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Handle error fetching git hash/dirty state
Ed Maste committed 5 years ago
commit 9a04cb311b00b6a47c9118cad95ec801151fd631
parent e5a5c7e
1 file changed +3 -3
modified auto.def
@@ -35,9 +35,9 @@ define LIBVERSION 4
define LIBSOEXT [format [get-define SH_SOEXTVER] [get-define LIBVERSION]]

define GITHASH ""
-
if {[cc-check-progs git] && [file exists .git]} {
-
	catch {exec git rev-parse --short HEAD} gitrev
-
	catch {exec git diff-index -m --name-only HEAD} gitdirty
+
if {[cc-check-progs git] && [file exists .git] &&
+
    ![catch {exec git rev-parse --short HEAD} gitrev] &&
+
    ![catch {exec git diff-index -m --name-only HEAD} gitdirty]} {
	define GITHASH -$gitrev[expr {$gitdirty eq {} ? {} : {-dirty}}]
}