facebook / flow

Adds static typing to JavaScript to improve developer productivity and code quality.
https://flow.org/
MIT License
22.09k stars 1.85k forks source link

[flow][ci] Fix github_upload.sh #9171

Closed SamChou19815 closed 4 days ago

SamChou19815 commented 4 days ago

In the release changelog, we will have multiline messages, which will show up in the json like this. Echo will turn the escape sequence \n into actual new lines, and produce an illegal json, which the jq cannot deal with.

To fix, we use printf instead. We can see the difference with the following tests


$ printf "%s\n" "\n"
\n                                                                           
$ echo "\n"
facebook-github-bot commented 4 days ago

@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 4 days ago

@SamChou19815 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 4 days ago

@SamChou19815 merged this pull request in facebook/flow@c7044e85ff8c4a7122003941c2f96e10837d5fcf.