Skip to content

Commit

Permalink
Fix xargs handling
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoref committed Feb 18, 2020
1 parent 4a777f6 commit 52d5ec0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test-spelling-unknown-words
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ fi

xargs_zero() {
if [ $(uname) = "Linux" ]; then
xargs --no-run-if-empty -0 "$@"
xargs --no-run-if-empty -0 -n1 "$@"
else
args="$*" "$spellchecker/xargs_zero"
arguments="$*" "$spellchecker/xargs_zero"
fi
}
(git 'ls-files' -z 2> /dev/null) |\
Expand Down
2 changes: 1 addition & 1 deletion xargs_zero
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env perl
$/="\0";
while (<>) {
my $cmd="$ENV{args} $_";
my $cmd="$ENV{arguments} $_";
print `$cmd`;
}

0 comments on commit 52d5ec0

Please sign in to comment.