Skip to content

Commit

Permalink
Don't turn on set -e until after we test for the presence of aspell.
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
  • Loading branch information
icefox committed Jan 25, 2012
1 parent 8425d93 commit c92277b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions contrib/commit-msg/spellcheck
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:"
Expand Down

0 comments on commit c92277b

Please sign in to comment.