Skip pre-commit if virtualenv is not found
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
. "VIRTUALENV_ACTIVATE"
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "Failed to source virtualenv. Skipping pre-commit hook."
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
set -e
|
||||
PURPLE='\033[0;35m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
. "VIRTUALENV_ACTIVATE"
|
||||
|
||||
printf "${PURPLE}Running pre-commit tests.${NC}\n"
|
||||
npm test
|
||||
pycodestyle .
|
||||
|
||||
Reference in New Issue
Block a user