Skip to content

Commit 06e8ee4

Browse files
committed
fix(validator): solve macos compatibility
replace getopt by a loop on args
1 parent c9c8c46 commit 06e8ee4

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

check_message.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22

33
set -eu
44

5-
OPTIONS=$(getopt --longoptions no-jira,allow-temp,jira-in-header,header-length:,body-length:,jira-types: --options "" -- "$@")
65
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
76

8-
eval set -- $OPTIONS
9-
while true; do
7+
while [[ $# -gt 0 ]]; do
108
case "$1" in
119
--no-jira ) COMMIT_VALIDATOR_NO_JIRA=1; shift ;;
1210
--allow-temp ) COMMIT_VALIDATOR_ALLOW_TEMP=1; shift ;;

0 commit comments

Comments
 (0)