From 0313c09562947e19c48be4fa7c8d954b533301dd Mon Sep 17 00:00:00 2001 From: Sean Mac Gillicuddy Date: Wed, 21 Aug 2019 13:43:35 +0100 Subject: [PATCH 1/2] Hotfix: Pre-commit hook failure message --- team-props/git-hooks/pre-commit.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/team-props/git-hooks/pre-commit.sh b/team-props/git-hooks/pre-commit.sh index eb4086362..d96fee109 100644 --- a/team-props/git-hooks/pre-commit.sh +++ b/team-props/git-hooks/pre-commit.sh @@ -6,11 +6,12 @@ echo "Running lint..." status=$? -if [ "$status" = 0 ] ; then +if [[ "$status" = 0 ]] ; then echo "Static analysis found no problems." exit 0 else ./gradlew app:ktlintKiwixDebugFormat --daemon 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 fi From 7306143ad5d28c25526b5d64cb9a1a5f042d0570 Mon Sep 17 00:00:00 2001 From: Sean Mac Gillicuddy Date: Wed, 21 Aug 2019 16:00:40 +0100 Subject: [PATCH 2/2] fix codefactor issue --- team-props/git-hooks/pre-commit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/team-props/git-hooks/pre-commit.sh b/team-props/git-hooks/pre-commit.sh index d96fee109..77231c23c 100644 --- a/team-props/git-hooks/pre-commit.sh +++ b/team-props/git-hooks/pre-commit.sh @@ -6,7 +6,7 @@ echo "Running lint..." status=$? -if [[ "$status" = 0 ]] ; then +if [ "$status" = 0 ] ; then echo "Static analysis found no problems." exit 0 else