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(regression): invalid json output. #930

Merged
merged 5 commits into from Jan 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Expand Up @@ -3,7 +3,6 @@ name: CI
on:
push:
branches:
- main
- "**"
pull_request:
types:
Expand Down
4 changes: 2 additions & 2 deletions get-changed-paths.sh
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion test/test/test.txt
@@ -1 +1 @@
This is a test file
This is a test file.