Capture the output of uncrustify instead of silencing it, and print it
out if uncrustify fails to run for any reason.
Change-Id: Iaefd89b586feb7e3148ad48a2b0f65d69ca7ac17
# Run uncrustify on the temporary directory
cd $tmpdir/org
-if ! $UNCRUSTIFY -c $cfg_file -F $tmpdir/filelist --prefix=../new/ -q ; then
- echo "Reformatting failed!"
+if ! $UNCRUSTIFY -c $cfg_file -F $tmpdir/filelist --prefix=../new/ >$tmpdir/uncrustify.out 2>&1 ; then
+ echo "Reformatting failed. Check uncrustify output below for errors:"
+ cat $tmpdir/uncrustify.out
rm -rf $tmpdir
exit 2
fi