diff --git a/hook b/hook index 73ad59c..eb51d00 100755 --- a/hook +++ b/hook @@ -1,5 +1,7 @@ #!/bin/bash +git stash -q --keep-index + NODE=`which node 2> /dev/null` NODEJS=`which nodejs 2> /dev/null` IOJS=`which iojs 2> /dev/null` @@ -14,3 +16,9 @@ elif [[ -n $IOJS ]]; then elif [[ -x $LOCAL ]]; then "$LOCAL" $("$LOCAL" -e "console.log(require.resolve('pre-push'))") fi +RESULT=$? + +git stash pop -q +[ $RESULT -ne 0 ] && exit 1 +exit 0 +