supports multiline output

This commit is contained in:
YABATANIEN, Murichaduke 2021-09-12 10:07:32 +09:00 committed by Mike Farah
parent 6ba8dc75a6
commit 25ba763b08
1 changed files with 3 additions and 0 deletions

View File

@ -2,5 +2,8 @@
set -e set -e
echo "::debug::\$cmd: $1" echo "::debug::\$cmd: $1"
RESULT=$(eval "$1") RESULT=$(eval "$1")
RESULT="${RESULT//'%'/'%25'}"
RESULT="${RESULT//$'\n'/'%0A'}"
RESULT="${RESULT//$'\r'/'%0D'}"
echo "::debug::\$RESULT: $RESULT" echo "::debug::\$RESULT: $RESULT"
echo ::set-output name=result::"$RESULT" echo ::set-output name=result::"$RESULT"