Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix windows line endings in GitHub event text #12995

Closed
nrmancuso opened this issue Apr 18, 2023 · 2 comments · Fixed by #12996
Closed

Fix windows line endings in GitHub event text #12995

nrmancuso opened this issue Apr 18, 2023 · 2 comments · Fixed by #12996

Comments

@nrmancuso
Copy link
Member

nrmancuso commented Apr 18, 2023

EDITED:

Discovered at: https://github.com/checkstyle-ci-tester/checkstyle/actions/runs/4739501477/jobs/8414388078#step:5:25

./text: ASCII text, with CRLF, LF line terminators

GitHub uses windows line endings in comments/descriptions, and when we get the text from the event it has windows line endings. Here is the line endings shown in a tool that I found online:
image

The problem is that when we grep and sed these lines from the text, we leave a single carriage return at the end of each line. Example:

curl --fail-with-body -X GET $'https://gist.githubusercontent.com/0xbakry/a1fcb13eef42f29de8ff500892f34166/raw/1b0af8d2da606b273e8ef9aaed6278020f876202/config_check.xml/r' -H 'Accept: application/vnd.github+json' -H 'Authorization: token ***' -o

It seems like we found this issue when we migrated to curl, since curl is less forgiving of weird urls than wget is, perhaps.

We should replace all windows line endings in event text with linux line endings to fix this issue.


Test, note that we have only a commit to replace line endings in event text on master: https://github.com/checkstyle-ci-tester/checkstyle/commits/master

Here is successful file download: https://github.com/checkstyle-ci-tester/checkstyle/actions/runs/4739619430/jobs/8414613676#step:3:1

@nrmancuso
Copy link
Member Author

I am on it

nrmancuso added a commit to nrmancuso/checkstyle that referenced this issue Apr 18, 2023
nrmancuso added a commit to nrmancuso/checkstyle that referenced this issue Apr 19, 2023
nrmancuso added a commit to nrmancuso/checkstyle that referenced this issue Apr 19, 2023
nrmancuso added a commit to checkstyle-ci-tester/checkstyle that referenced this issue Apr 19, 2023
nrmancuso added a commit to checkstyle-ci-tester/checkstyle that referenced this issue Apr 19, 2023
nrmancuso added a commit to checkstyle-ci-tester/checkstyle that referenced this issue Apr 19, 2023
nrmancuso added a commit to checkstyle-ci-tester/checkstyle that referenced this issue Apr 19, 2023
nrmancuso added a commit to checkstyle-ci-tester/checkstyle that referenced this issue Apr 19, 2023
nrmancuso added a commit to checkstyle-ci-tester/checkstyle that referenced this issue Apr 19, 2023
nrmancuso added a commit to checkstyle-ci-tester/checkstyle that referenced this issue Apr 19, 2023
nrmancuso added a commit to checkstyle-ci-tester/checkstyle that referenced this issue Apr 19, 2023
nrmancuso added a commit to checkstyle-ci-tester/checkstyle that referenced this issue Apr 19, 2023
nrmancuso added a commit to checkstyle-ci-tester/checkstyle that referenced this issue Apr 19, 2023
nrmancuso added a commit to checkstyle-ci-tester/checkstyle that referenced this issue Apr 19, 2023
nrmancuso added a commit to checkstyle-ci-tester/checkstyle that referenced this issue Apr 19, 2023
nrmancuso added a commit to checkstyle-ci-tester/checkstyle that referenced this issue Apr 19, 2023
nrmancuso added a commit to nrmancuso/checkstyle that referenced this issue Apr 19, 2023
@nrmancuso nrmancuso changed the title Remove usages of append-to-github-output for non-multiline strings Fix windows line endings in GitHub event text Apr 19, 2023
@github-actions github-actions bot added this to the 10.9.4 milestone Apr 19, 2023
@nrmancuso
Copy link
Member Author

Closed via #12996

nrmancuso added a commit to ShivamPandey00/checkstyle that referenced this issue Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants