From bcab5bcd0218b23c9c4561ac6ba2c95fe31e82dd Mon Sep 17 00:00:00 2001 From: Eric Liang Date: Fri, 24 Aug 2018 15:01:12 -0700 Subject: [PATCH] fix it (#2735) --- .travis/yapf.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis/yapf.sh b/.travis/yapf.sh index 75fed3efe..d90aec895 100755 --- a/.travis/yapf.sh +++ b/.travis/yapf.sh @@ -48,8 +48,8 @@ format_changed() { MERGEBASE="$(git merge-base upstream/master HEAD)" if ! git diff --diff-filter=ACM --quiet --exit-code "$MERGEBASE" -- '*.py' &>/dev/null; then - declare -a unformatted_files && mapfile -t unformatted_files < <(git diff --name-only --diff-filter=ACM "$MERGEBASE" -- '*.py') - yapf --in-place "${YAPF_EXCLUDES[@]}" "${YAPF_FLAGS[@]}" -- "${unformatted_files[@]}" + git diff --name-only --diff-filter=ACM "$MERGEBASE" -- '*.py' | xargs -P 5 \ + yapf --in-place "${YAPF_EXCLUDES[@]}" "${YAPF_FLAGS[@]}" fi }