Skip to content

Commit

Permalink
Updated setting the exit status
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Sep 2, 2022
1 parent 0f7f451 commit 1faa996
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion diff-sha.sh
Expand Up @@ -46,7 +46,7 @@ else
fi

echo "Verifying the commit SHA: $CURRENT_SHA"
git rev-parse --quiet --verify "$CURRENT_SHA^{commit}" 1>/dev/null 2>&1; exit_status=$?
git rev-parse --quiet --verify "$CURRENT_SHA^{commit}" 1>/dev/null 2>&1 && exit_status=$? || exit_status=$?

if [[ $exit_status -ne 0 ]]; then
echo "::error::Unable to locate the current sha: $CURRENT_SHA"
Expand Down

0 comments on commit 1faa996

Please sign in to comment.