Skip to content

Commit c579ef8

Browse files
authored
Use new multiline output handler (#14)
1 parent 46d9a23 commit c579ef8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

action.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@ runs:
100100
grep_nospec=(grep 'No test files found')
101101
("${grep_eronly[@]}"<<<"$OUT" && "${grep_nospec[@]}"<<<"$OUT")&>/dev/null && echo "spec-missing=true" >> $GITHUB_OUTPUT
102102
OUT="$(sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g'<<<"$OUT")"
103-
OUT="${OUT//'%'/'%25'}";OUT="${OUT//$'\n'/'%0A'}"
104-
echo "stdout=${OUT//$'\r'/'%0D'}" >> $GITHUB_OUTPUT
103+
printf 'stdout<<END-OF-MINEUNIT-CONTENT\n%s\nEND-OF-MINEUNIT-CONTENT' "${OUT}" >> $GITHUB_OUTPUT
105104
exit $ERR
106105
- id: mineunit-report
107106
name: mineunit coverage report
@@ -110,8 +109,7 @@ runs:
110109
run: |
111110
$HOME/.luarocks/bin/mineunit -r
112111
OUT="$(awk -v p=0 '/^----/{p++;next}p==2{exit}p' luacov.report.out | sort -hrk4)"
113-
OUT="${OUT//'%'/'%25'}";OUT="${OUT//$'\n'/'%0A'}"
114-
echo "report=${OUT//$'\r'/'%0D'}" >> $GITHUB_OUTPUT
112+
printf 'report<<END-OF-MINEUNIT-CONTENT\n%s\nEND-OF-MINEUNIT-CONTENT' "${OUT}" >> $GITHUB_OUTPUT
115113
- id: mineunit-coverage
116114
name: collect coverage data
117115
working-directory: "${{ inputs.working-directory }}"

0 commit comments

Comments
 (0)