template/script/hooks/commit-msg in penchant-0.2.19 vs template/script/hooks/commit-msg in penchant-0.2.20
- old
+ new
@@ -27,10 +27,14 @@
unset GIT_DIR
penchant gemfile remote
GIT_DIR=$OLD_GIT_DIR
fi
- bundle exec rake
- R=$?
- if [ $R -ne 0 ]; then exit $R; fi
+ if [ $(bundle exec rake -P | grep default | wc -l) -ne 0 ]; then
+ bundle exec rake
+ R=$?
+ if [ $R -ne 0 ]; then exit $R; fi
+ else
+ echo "[penchant] No default Rake task found! Add one if you want to run tests before committing."
+ fi
fi