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
3 changed files with 3 additions and 4 deletions

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