mirror of
https://github.com/tj-actions/changed-files
synced 2024-12-16 09:27:57 +00:00
fix(regression): invalid json output. (#930)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
This commit is contained in:
parent
15cb0ce053
commit
7839ede089
3 changed files with 3 additions and 4 deletions
1
.github/workflows/test.yml
vendored
1
.github/workflows/test.yml
vendored
|
@ -3,7 +3,6 @@ name: CI
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- "**"
|
||||
pull_request:
|
||||
types:
|
||||
|
|
|
@ -52,13 +52,13 @@ function get_dirname_max_depth() {
|
|||
}
|
||||
|
||||
function json_output() {
|
||||
JQ_ARGS="-R"
|
||||
JQ_ARGS="-sR"
|
||||
if [[ "$INPUT_JSON_RAW_FORMAT" == "true" ]]; then
|
||||
JQ_ARGS="$JQ_ARGS -r"
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
jq $JQ_ARGS 'split("\n") | @json' | tr -s /
|
||||
jq $JQ_ARGS 'split("\n") | map(select(. != "")) | @json' | sed -r 's/^"|"$//g' | tr -s /
|
||||
}
|
||||
|
||||
function get_diff() {
|
||||
|
|
|
@ -1 +1 @@
|
|||
This is a test file
|
||||
This is a test file.
|
||||
|
|
Loading…
Reference in a new issue