Skip to content

Commit

Permalink
Fix sed gobbling for a newline replacement
Browse files Browse the repository at this point in the history
Current version of `sed` on `ubuntu:jammy-20221101` stopped working as before.
As a result newlines weren't showing properly in PR body.
Output was polluted by `^NowALiNiA^` strings, which should be newlines.
  • Loading branch information
ChristophShyper committed Nov 10, 2022
1 parent 68ca50e commit 88b40e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ if [[ "${INPUT_GET_DIFF}" == "true" ]]; then
TEMPLATE=$(echo -e "${TEMPLATE}" | sed ':a;N;$!ba; s#<!-- Diff files -->#<!-- Diff files - START -->\n'"${GIT_DIFF}"'\n<!-- Diff files - END -->#g')
TEMPLATE=$(echo -e "${TEMPLATE}" | sed ':a;N;$!ba; s#<!-- Diff files - START -->.*<!-- Diff files - END -->#<!-- Diff files - START -->\n'"${GIT_DIFF}"'\n<!-- Diff files - END -->#g')
fi
TEMPLATE=$(echo -e "${TEMPLATE}" | sed 's|\^HaSz\^|#|g' | sed ':a;N;$!ba; s|\^NowALiNiA\^|\n|g')
TEMPLATE=$(echo -e "${TEMPLATE}" | sed 's|\^HaSz\^|#|g' | sed '1h;2,$H;$!d;g; s|\^NowALiNiA\^|\n|g')

if [[ -z "${PR_NUMBER}" ]]; then
echo -e "\nSetting all arguments..."
Expand Down

0 comments on commit 88b40e3

Please sign in to comment.