scripts/format-code.sh: Immediately exit on bad exit status

Shell scripts exit with the exit status of the last command if `set -e`
is not in use. Adding code to the end of the script to support the local
format-code.sh meant that `git --no-pager diff --exit-code` was not
necessarily the last command to be executed by the script, and therefore
the script's exit code did not necessarily reflect the presence of badly
formatted code.

Fixes openbmc/openbmc#3125

Change-Id: Icefad5b81b420c364022075face7c4027d8af4e6
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/scripts/format-code.sh b/scripts/format-code.sh
index bc42c07..42be8ec 100755
--- a/scripts/format-code.sh
+++ b/scripts/format-code.sh
@@ -12,6 +12,8 @@
 DIR=$1
 cd ${DIR}
 
+set -e
+
 echo "Formatting code under $DIR/"
 
 if [ -f "setup.cfg" ]; then