diff --git a/.github/workflows/_release.yml b/.github/workflows/_release.yml index 9c348b246f5d0..a410217dad6f6 100644 --- a/.github/workflows/_release.yml +++ b/.github/workflows/_release.yml @@ -107,7 +107,8 @@ jobs: fi # confirm prev-tag actually exists in git repo with git tag - if [ -z git tag -l "$PREV_TAG" ]; then + GIT_TAG_RESULT=$(git tag -l "$PREV_TAG") + if [ -z "$GIT_TAG_RESULT" ]; then echo "Previous tag $PREV_TAG not found in git repo" exit 1 fi