Skip to content

Commit 80238b5

Browse files
authored
fix: improve support for commit validation in MacOS (#4049)
Refs: #4046
1 parent a65c8bc commit 80238b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jenkins/scripts/node-test-commit-pre.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ git rev-parse $REBASE_ONTO
2929

3030
# COMMIT_SHA_CHECK needs to be set in the job. Check that it looks like
3131
# a SHA and not some other git ref (e.g. branch ref)
32-
if ! expr "${COMMIT_SHA_CHECK}" : "[0-9a-fA-F]\\+\$" > /dev/null; then
32+
if ! echo "${COMMIT_SHA_CHECK}" | grep -qE '^[0-9a-fA-F]+$'; then
3333
echo "COMMIT_SHA_CHECK does not look like a SHA"
3434
exit 1
3535
fi

0 commit comments

Comments
 (0)