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: handle new line used as separator #287

Merged
merged 20 commits into from
Apr 19, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,13 @@ Support this project with a :star:

* Free software: [MIT license](LICENSE)


Check warning

Code scanning / Markdownlint (reported by Codacy)

Expected: 1; Actual: 2

Expected: 1; Actual: 2
## Known Limitation

> **Warning**:
>
> * Using characters like `\n`, `%`, `.` and `\r` as separators would be [URL encoded](https://www.w3schools.com/tags/ref_urlencode.asp)

Check warning

Code scanning / Markdownlint (reported by Codacy)

Expected: 1; Actual: 3

Expected: 1; Actual: 3

## Report Bugs

Report bugs at https://github.com/tj-actions/verify-changed-files/issues.
Expand Down
5 changes: 5 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

set -e

INPUT_SEPARATOR="${INPUT_SEPARATOR//'%'/'%25'}"
INPUT_SEPARATOR="${INPUT_SEPARATOR//'.'/'%2E'}"
INPUT_SEPARATOR="${INPUT_SEPARATOR//$'\n'/'%0A'}"
INPUT_SEPARATOR="${INPUT_SEPARATOR//$'\r'/'%0D'}"

echo "::group::verify-changed-files"

if [[ -n "$INPUT_FILES_PATTERN_FILE" ]]; then
Expand Down