3
0
Fork 0
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:
Tonye Jack 2023-01-05 10:19:06 -07:00 committed by GitHub
parent 15cb0ce053
commit 7839ede089
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 4 deletions

View file

@ -3,7 +3,6 @@ name: CI
on:
push:
branches:
- main
- "**"
pull_request:
types:

View file

@ -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() {

View file

@ -1 +1 @@
This is a test file
This is a test file.