From fd147a36a9622923a4d1cde29b1fc06ebaf727f9 Mon Sep 17 00:00:00 2001 From: Charadon Date: Mon, 8 Aug 2022 16:05:33 -0400 Subject: Fix issue where sometimes CURRENT_COMMIT returns nothing. --- dscip | 3 +++ 1 file changed, 3 insertions(+) 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. # -- cgit 1.4.1-2-gfad0