about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCharadon <dev@iotib.net>2022-08-08 16:05:33 -0400
committerCharadon <dev@iotib.net>2022-08-08 16:05:33 -0400
commitfd147a36a9622923a4d1cde29b1fc06ebaf727f9 (patch)
treec34a04d828059688bff45180feda7929ec7ddf9e
parent754b103c83c726fdd990f27ab91b56745b69c2fd (diff)
downloaddscip-fd147a36a9622923a4d1cde29b1fc06ebaf727f9.tar.gz
Fix issue where sometimes CURRENT_COMMIT returns nothing.
-rwxr-xr-xdscip3
1 files changed, 3 insertions, 0 deletions
diff --git a/dscip b/dscip
index a67297f..de733e7 100755
--- a/dscip
+++ b/dscip
@@ -119,6 +119,9 @@ run () {
 
 	# Loads current commit hash #
 	CURRENT_COMMIT=$(git ls-remote "$DSCIP_GITREPO" | awk "/refs\/(heads|tags)\/$DSCIP_BRANCH/{print \$1}")
+	if [ -z "$CURRENT_COMMIT" ]; then
+		return 0
+	fi
 	export CURRENT_COMMIT
 
 	# If LAST_COMMIT doesn't exist, that means it's a first run and we can go ahead and build. #