Skip to content

Set-output Truncates Multiline Strings #26288

Set-output Truncates Multiline Strings #26288
Nov 12, 2019 · 20 answers
You must be logged in to vote

I got response from the team. 

% and \n and \r can be escaped like below, the runner will unescape in reverse.

content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
content="${content//$'\r'/'%0D'}"

Please try to add next three red lines to your yml, kindly let me know whether this could help.

- shell: bash
        id: release_description
        run: |
          description=$(./resources/get_release_description.sh ${{ steps.versioning.outputs.cli_version }})
          echo $description
<font color="#FF0000"> description="${description//'%'/'%25'}"
          description="${description//$'\n'/'%0A'}"
          description="${description//$'\r'/'%0D'}"</font>
echo "::set-output…

Replies: 20 suggested answers

You must be logged in to vote
0 replies
You must be logged in to vote
0 replies
Answer selected
You must be logged in to vote
0 replies
You must be logged in to vote
0 replies
You must be logged in to vote
0 replies
You must be logged in to vote
0 replies
You must be logged in to vote
0 replies
You must be logged in to vote
0 replies
You must be logged in to vote
0 replies
You must be logged in to vote
0 replies
You must be logged in to vote
0 replies
You must be logged in to vote
0 replies
You must be logged in to vote
0 replies
You must be logged in to vote
0 replies
You must be logged in to vote
0 replies
You must be logged in to vote
0 replies
You must be logged in to vote
0 replies
You must be logged in to vote
0 replies
You must be logged in to vote
0 replies
You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet