File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,17 +81,20 @@ jobs:
8181
8282 # Parse comment into command args
8383 comment='${{ github.event.comment.body }}'
84- command=$(head -n1 <<< "$comment")
84+ read -r command <<< "$comment"
8585 args=${command#!update-configs}
8686
8787 # Processing args
8888 # FIXME: Wouldn't handle positional args, if they were part of the command syntax
89- for arg in $args; do
90- case $arg in
91- profile=*) profile="${arg#profile=}" ;;
92- *) echo "::error::Unknown argument '$arg'. Usage: $USAGE"; exit 1;;
93- esac
94- done
89+ # If there isn't anything after !update-configs, args will be empty (or erroneously spaces, which we strip)
90+ if [ -n "${args// }" ]; then
91+ for arg in $args; do
92+ case $arg in
93+ profile=*) profile="${arg#profile=}" ;;
94+ *) echo "::error::Unknown argument '$arg'. Usage: $USAGE"; exit 1;;
95+ esac
96+ done
97+ fi
9598
9699 # Output processed args
97100 echo "profile=$profile" >> $GITHUB_OUTPUT
You can’t perform that action at this time.
0 commit comments