diff options
author | Benjamin C Meyer <ben@meyerhome.net> | 2012-01-25 00:36:24 -0500 |
---|---|---|
committer | Benjamin C Meyer <ben@meyerhome.net> | 2012-01-25 00:39:12 -0500 |
commit | c92277bf74855ebb79f8662aa8ce9a2a3383168b (patch) | |
tree | dcc404ec8964e6a4c59367cd20d4e003d7cd66f7 | |
parent | 8425d932263e9d2302bd63c08ec9d088f9e32157 (diff) | |
download | git-hooks-c92277bf74855ebb79f8662aa8ce9a2a3383168b.tar.gz git-hooks-c92277bf74855ebb79f8662aa8ce9a2a3383168b.tar.bz2 |
Don't turn on set -e until after we test for the presence of aspell.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
-rwxr-xr-x | contrib/commit-msg/spellcheck | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/commit-msg/spellcheck b/contrib/commit-msg/spellcheck index de4147c..0b9938d 100755 --- a/contrib/commit-msg/spellcheck +++ b/contrib/commit-msg/spellcheck @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2010, Benjamin C. Meyer <ben@meyerhome.net> +# Copyright (c) 2010-2012, Benjamin C. Meyer <ben@meyerhome.net> # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -26,14 +26,15 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -set -e - function run_test { which aspell > /dev/null if [ ! $? -eq 0 ] ; then exit 0 fi + + set -e + warnings=`cat "${1}" | grep -v '^#.*' | aspell list` if [ ! -z "${warnings}" ] ; then echo >&2 "Possible spelling errors in the commit message:" |