File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ jobs:
128
128
run : |
129
129
ERRORS=$(find * -name '*.yaml' -or -name '*.yml' -or -name '*.txt' -or -name '*.md' -or -name '*.markdown' \
130
130
-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)
132
132
133
133
if [[ "" != "$ERRORS" ]]; then echo -e "$ERRORS\n"; exit 1; fi
134
134
@@ -154,7 +154,7 @@ jobs:
154
154
name : JSON files are valid
155
155
if : " always() && steps.checkout.outcome == 'success'"
156
156
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 *}')
158
158
159
159
if [[ "" != "$ERRORS" ]]; then echo -e "$ERRORS\n"; exit 1; fi
160
160
You can’t perform that action at this time.
0 commit comments