File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ function main-invocation() {
7171 # 2MB on Linux but only 256KB on macOS. Assume a maximum filename
7272 # length of 200 characters and limiting us to batches of 1000 files
7373 # gives us a bit of a safety margin.
74- dry_run_opt=" ${dry_run_opt:- } " xargs --max-args=1000 scripts/githooks/check-file-format.sh " $method "
74+ dry_run_opt=" ${dry_run_opt:- } " xargs --max-args=1000 --no-run-if-empty scripts/githooks/check-file-format.sh " $method "
7575}
7676
7777# Run editorconfig natively.
@@ -96,13 +96,10 @@ function main-tool-wrapper--via-docker() {
9696
9797 # shellcheck disable=SC2155
9898 local image=$( name=mstruebing/editorconfig-checker docker-get-image-version-and-pull)
99- # We use /dev/null here as a backstop in case there are no files in the state
100- # we choose. If the filter comes back empty, adding `/dev/null` onto it has
101- # the effect of preventing `ec` from treating "no files" as "all the files".
10299 docker run --rm --platform linux/amd64 \
103100 --volume " $PWD " :/check \
104101 " $image " \
105- sh -c " ec --exclude '.git/' $dry_run_opt $( printf ' %q ' " $@ " ) /dev/null "
102+ sh -c " ec --exclude '.git/' $dry_run_opt $( printf ' %q ' " $@ " ) "
106103}
107104
108105# ==============================================================================
You can’t perform that action at this time.
0 commit comments