Skip to content

Commit

Permalink
Rather than switching to the top-level directory of the repository, s…
Browse files Browse the repository at this point in the history
…witch back to the previous directory.
  • Loading branch information
wimleers committed Mar 4, 2014
1 parent 2dad4e2 commit 0461f87
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ for FILE in $FILES; do
done

if [ "$CHECK_PHPUNIT" == "1" ] ; then
ORIGINAL_DIR=`pwd`
cd "$(git rev-parse --show-toplevel)/core"
vendor/phpunit/phpunit/phpunit.php
PHPUNIT=$?
Expand All @@ -88,7 +89,7 @@ if [ "$CHECK_PHPUNIT" == "1" ] ; then
# PHPUnit will handle the output.
STATUS=1
fi
cd "$(git rev-parse --show-toplevel)"
cd $ORIGINAL_DIR
fi

# Restore unstaged changes.
Expand Down

0 comments on commit 0461f87

Please sign in to comment.