We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd965c5 commit 6df0d31Copy full SHA for 6df0d31
commands/format
@@ -15,10 +15,13 @@ EOF
15
exit 1
16
fi
17
18
+NO_RUN_IF_EMPTY=()
19
+if [[ "$OSTYPE" != "darwin"* ]]; then NO_RUN_IF_EMPTY+=(--no-run-if-empty); fi
20
+
21
for ROOT in provides internals ; do
- find $ROOT -name '*.md' -print0 | xargs -0 prettier --write --
22
+ find $ROOT -name '*.md' -print0 | xargs "${NO_RUN_IF_EMPTY[@]}" -0 prettier --write --
23
for SUFFIX in cpp hpp ; do
- find $ROOT -name "*.$SUFFIX" -print0 | xargs -0 clang-format -i --
24
+ find $ROOT -name "*.$SUFFIX" -print0 | xargs "${NO_RUN_IF_EMPTY[@]}" -0 clang-format -i --
25
done
26
27
0 commit comments