From 4703a0ce803001e79c367a0cf1e58e1678dd76fd Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Thu, 3 Nov 2022 06:23:50 -0600 Subject: [PATCH] Update diff-sha.sh --- diff-sha.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diff-sha.sh b/diff-sha.sh index 25c715d0..626a5cf2 100644 --- a/diff-sha.sh +++ b/diff-sha.sh @@ -157,7 +157,7 @@ else fi fi -if [[ -n "$PREVIOUS_SHA" && -n "$CURRENT_SHA" && "$PREVIOUS_SHA" == "$CURRENT_SHA" && "$INITIAL_COMMIT" == "false" ]]; then +if [[ "$PREVIOUS_SHA" == "$CURRENT_SHA" && "$INITIAL_COMMIT" == "false" ]]; then echo "::error::Similar commit hashes detected: previous sha: $PREVIOUS_SHA is equivalent to the current sha: $CURRENT_SHA" echo "::error::You seem to be missing 'fetch-depth: 0' or 'fetch-depth: 2'. See https://github.com/tj-actions/changed-files#usage" exit 1