Skip to content

Commit 7a02acd

Browse files
Fix escaping args in commands
1 parent a24eb2a commit 7a02acd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/callable-qa.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ jobs:
128128
run: |
129129
ERRORS=$(find * -name '*.yaml' -or -name '*.yml' -or -name '*.txt' -or -name '*.md' -or -name '*.markdown' \
130130
-or -name '*.json' -or -name '*.rst' -or -name '*.php' -or -name '*.js' -or -name '*.css' -or -name '*.twig' \
131-
| xargs -n1 -I{} bash -c '[ -n "$(tail -c1 {})" ] && echo ::error file={},line=$((1 + `wc -l {} | cut -d" " -f1`))::Should end with a newline' || true)
131+
| xargs -n1 -P0 bash -c '[ -n "$(tail -c1 "$0")" ] && echo ::error file="$0",line=$((1 + `wc -l "$0" | cut -d" " -f1`))::Should end with a newline' || true)
132132
133133
if [[ "" != "$ERRORS" ]]; then echo -e "$ERRORS\n"; exit 1; fi
134134
@@ -154,7 +154,7 @@ jobs:
154154
name: JSON files are valid
155155
if: "always() && steps.checkout.outcome == 'success'"
156156
run: |
157-
ERRORS=$(find * -name '*.json' | xargs -I{} -n1 -P0 bash -c 'ERR=$(cd / && python -mjson.tool '$(pwd)'/{} 2>&1 1> /dev/null) || echo \\n::error file={},line=`echo "${ERR#*: line }" | cut -d" " -f 1`::${ERR%%: line *}')
157+
ERRORS=$(find * -name '*.json' | xargs -n1 -P0 bash -c 'ERR=$(cd / && python -mjson.tool '$(pwd)'/"$0" 2>&1 1> /dev/null) || echo \\n::error file="$0",line=`echo "${ERR#*: line }" | cut -d" " -f 1`::${ERR%%: line *}')
158158
159159
if [[ "" != "$ERRORS" ]]; then echo -e "$ERRORS\n"; exit 1; fi
160160

0 commit comments

Comments
 (0)