grep: DO NOT return exit code 1 on no match
[releng/global-jjb.git] / shell / git-validate-jira-urls.sh
index d44fec9..51d5132 100644 (file)
@@ -15,7 +15,7 @@
 set -e -o pipefail
 set +u
 
-JIRA_LINK=$(git rev-list --format=%B --max-count=1 HEAD | grep -io 'http[s]*://jira\..*')
+JIRA_LINK=$(git rev-list --format=%B --max-count=1 HEAD | grep -io 'http[s]*://jira\..*' || true)
 if [[ ! -z "$JIRA_LINK" ]]
 then
   echo 'Remove JIRA URLs from commit message'