Skip to content

Commit 9c342cc

Browse files
committed
When something failes, provode a little additional context.
1 parent 83e6e42 commit 9c342cc

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

runchecks.sh

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,20 @@ npm_checks() {
2222
)
2323
}
2424

25-
if rust_checks && npm_checks
26-
then
27-
echo "Everything is OK"
28-
else
29-
rv=$?
30-
exec >&2
31-
echo
32-
echo 'Please fix the problems above before committing your change.'
33-
echo '(if the problem is that wasm-opt was not found, please see docs/build/web.md)'
34-
exit $rv
35-
fi
25+
for check in rust_checks npm_checks
26+
do
27+
if $check
28+
then
29+
printf "%s: OK\n" "${check}"
30+
else
31+
rv=$?
32+
exec >&2
33+
echo
34+
echo "check ${check} failed."
35+
echo
36+
echo 'Please fix the problems above before committing your change.'
37+
echo '(if the problem is that wasm-opt was not found, please see docs/build/web.md)'
38+
exit $rv
39+
fi
40+
done
41+
echo "Everything is OK"

0 commit comments

Comments
 (0)