Skip to content

Commit 88b40e3

Browse files
Fix sed gobbling for a newline replacement
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.
1 parent 68ca50e commit 88b40e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ if [[ "${INPUT_GET_DIFF}" == "true" ]]; then
129129
TEMPLATE=$(echo -e "${TEMPLATE}" | sed ':a;N;$!ba; s#<!-- Diff files -->#<!-- Diff files - START -->\n'"${GIT_DIFF}"'\n<!-- Diff files - END -->#g')
130130
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')
131131
fi
132-
TEMPLATE=$(echo -e "${TEMPLATE}" | sed 's|\^HaSz\^|#|g' | sed ':a;N;$!ba; s|\^NowALiNiA\^|\n|g')
132+
TEMPLATE=$(echo -e "${TEMPLATE}" | sed 's|\^HaSz\^|#|g' | sed '1h;2,$H;$!d;g; s|\^NowALiNiA\^|\n|g')
133133

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

0 commit comments

Comments
 (0)