Hotfix: Pre-commit hook failure message

This commit is contained in:
Sean Mac Gillicuddy 2019-08-21 13:43:35 +01:00
parent 40571e7f34
commit 0313c09562

View File

@ -6,11 +6,12 @@ echo "Running lint..."
status=$? status=$?
if [ "$status" = 0 ] ; then if [[ "$status" = 0 ]] ; then
echo "Static analysis found no problems." echo "Static analysis found no problems."
exit 0 exit 0
else else
./gradlew app:ktlintKiwixDebugFormat --daemon ./gradlew app:ktlintKiwixDebugFormat --daemon
echo 1>&2 "Static analysis found violations and attempted to autofix, please commit these autoformat changes" echo 1>&2 "Static analysis found violations and attempted to autofix, please commit these autoformat changes"
echo "If the build failed for another reason please make sure JAVA_HOME is set to JDK8"
exit 1 exit 1
fi fi