Silence error if build directory is not a git repository

This commit is contained in:
GriffinR 2024-09-09 19:02:37 -04:00
parent 7c8d5d0d63
commit 1e4ba6a668

View file

@ -22,7 +22,7 @@ QMAKE_TARGET_BUNDLE_PREFIX = com.pret
# Get latest commit hash if we can (to display alongside version information).
GIT_PATH = $$system(which git)
!isEmpty(GIT_PATH) {
LATEST_COMMIT = $$system($$GIT_PATH rev-parse --short HEAD)
LATEST_COMMIT = $$system($$GIT_PATH rev-parse --short HEAD 2>/dev/null)
}
DEFINES += PORYMAP_LATEST_COMMIT=\\\"$$LATEST_COMMIT\\\"