Skip to content

Commit 8b7459a

Browse files
committed
fix: allow script to run on MacOS safely
1 parent 59b7905 commit 8b7459a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

check_message.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env bash
22

33
set -eu
4+
echo "$@"
45

56
OPTIONS=$(getopt --longoptions no-jira,allow-temp,jira-in-header,header-length,body-length:,jira-types: --options "" -- "$@")
67
unset COMMIT_VALIDATOR_ALLOW_TEMP COMMIT_VALIDATOR_NO_JIRA COMMIT_VALIDATOR_NO_REVERT_SHA1 GLOBAL_JIRA_IN_HEADER GLOBAL_MAX_LENGTH GLOBAL_BODY_MAX_LENGTH GLOBAL_JIRA_TYPES
@@ -32,7 +33,7 @@ then
3233
fi
3334

3435
# removing comment lines from message
35-
MESSAGE=$(sed '/^#/d' "$1")
36+
MESSAGE=$(echo $1 | sed '/^#/d')
3637

3738
FIRST_WORD=${MESSAGE%% *}
3839
if [[ "${FIRST_WORD,,}" == merge ]]

0 commit comments

Comments
 (0)