use printf
to avoid commit messages containing `` from running commands on the actions runner
This commit is contained in:
parent
30f4c5eeb0
commit
9868104f1c
1 changed files with 2 additions and 1 deletions
|
@ -129,7 +129,8 @@ jobs:
|
|||
id: check_commit_message
|
||||
run: |
|
||||
COMMIT_MESSAGE="${{ steps.extract_commit_message.outputs.message }}"
|
||||
OUTPUT="$(python .gitea/workflows/scripts/message.py "$COMMIT_MESSAGE")"
|
||||
ESCAPED_COMMIT_MESSAGE="$(printf '%q' "$COMMIT_MESSAGE")"
|
||||
OUTPUT="$(python .forgejo/workflows/scripts/message.py '$ESCAPED_COMMIT_MESSAGE')"
|
||||
if [ "$OUTPUT" = "Usage: python message.py <commit_message>" ]; then
|
||||
echo "Called without commit message!"
|
||||
exit 1
|
||||
|
|
Reference in a new issue