From 3e827ae4d1aabf31ec4bd636797dd9fdce4a47a3 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Tue, 15 Nov 2022 10:38:56 -0700 Subject: [PATCH] Update diff-sha.sh --- diff-sha.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/diff-sha.sh b/diff-sha.sh index e6cf0cd2..434bab4c 100644 --- a/diff-sha.sh +++ b/diff-sha.sh @@ -187,7 +187,8 @@ else PREVIOUS_SHA=$GITHUB_EVENT_BEFORE if ! git rev-parse --quiet --verify "$PREVIOUS_SHA^{commit}" 1>/dev/null 2>&1; then - PREVIOUS_SHA=$(git rev-parse "$(git branch -r --sort=-committerdate | head -1)" 2>&1) && exit_status=$? || exit_status=$? + # shellcheck disable=SC2046 + PREVIOUS_SHA=$(git rev-parse $(git branch -r --sort=-committerdate | head -1) 2>&1) && exit_status=$? || exit_status=$? fi else PREVIOUS_SHA=$(git rev-list -n 1 "$TARGET_BRANCH" 2>&1) && exit_status=$? || exit_status=$?