Skip to content

Commit

Permalink
properly escape the output (#2)
Browse files Browse the repository at this point in the history
* use tr

* replace " with %22

* print the commit message and the escaped message

* use sed instead

* escape the commit message before setting it as an output
  • Loading branch information
keewis authored Mar 15, 2021
1 parent 1b8742e commit e7750e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ fi
echo "keyword detected: $result"
echo "::endgroup::"

echo "::set-output name=COMMIT_MESSAGE::$commit_message"
echo "::set-output name=COMMIT_MESSAGE::$(echo $commit_message | sed 's/\"/\\"/g')"
echo "::set-output name=CI_TRIGGERED::$result"

0 comments on commit e7750e0

Please sign in to comment.