File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 1- #! /bin/sh
1+ #! /bin/bash
22
33set -eu
44
55FAILURES=" "
66
7- # This is a Make based environment, therefore we don't have funny names to take
8- # care of, and anyone who can cause commands to be run by injecting files can
9- # just as well modify the scripts being run. (Otherwise we'd need to go through
10- # a less readable print0 / read).
11- for CARGOTOML in ` find -name Cargo.toml`
7+ while IFS= read -r -d ' ' CARGOTOML
128do
139 if cargo fmt --quiet --check --manifest-path " ${CARGOTOML} " ; then
1410 continue
1511 else
1612 FAILURES=" ${FAILURES} ${CARGOTOML% Cargo.toml} "
1713 fi
18- done
14+ done < <( find . -name Cargo.toml -print0 )
1915
2016if [ x" " != x" ${FAILURES} " ]; then
2117 echo " Some Rust files are following rustfmt, in particular in:"
2218 echo " ${FAILURES} "
2319 echo " You can format the code locally using:"
2420 echo
2521 echo " find -name Cargo.toml -exec cargo fmt --manifest-path '{}' ';'"
26- if [ ! -z " ${GITHUB_RUN_ID:- } " ]; then
22+ if [ -n " ${GITHUB_RUN_ID:- } " ]; then
2723 echo
2824 echo " The author of this test regrets not knowing how to provide an easy way to just click a button here that provides the right fixup commits."
2925 fi
You can’t perform that action at this time.
0 commit comments