Skip to content

Commit

Permalink
chore: fix issue with multiline strings in output
Browse files Browse the repository at this point in the history
Looking at [1] this should do some magic, so let's see.

[1] https://github.community/t/set-output-truncates-multiline-strings/16852
  • Loading branch information
harmw committed Mar 31, 2022
1 parent 5fc1b0e commit 1dd44fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hadolint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if [ -n "$HADOLINT_OUTPUT" ]; then
echo "$RESULTS" > $HADOLINT_OUTPUT
fi

RESULTS="${RESULTS//\`/\\\`}"
RESULTS="${RESULTS//$'\\n'/''}"
echo "::set-output name=results::$RESULTS"

[ -z "$HADOLINT_OUTPUT" ] || echo "Hadolint output saved to: $HADOLINT_OUTPUT"
Expand Down

0 comments on commit 1dd44fc

Please sign in to comment.