diff options
author | Charadon <dev@iotib.net> | 2022-08-08 16:05:33 -0400 |
---|---|---|
committer | Charadon <dev@iotib.net> | 2022-08-08 16:05:33 -0400 |
commit | fd147a36a9622923a4d1cde29b1fc06ebaf727f9 (patch) | |
tree | c34a04d828059688bff45180feda7929ec7ddf9e | |
parent | 754b103c83c726fdd990f27ab91b56745b69c2fd (diff) | |
download | dscip-fd147a36a9622923a4d1cde29b1fc06ebaf727f9.tar.gz |
Fix issue where sometimes CURRENT_COMMIT returns nothing.
-rwxr-xr-x | dscip | 3 |
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. # |