Browse Source

produce some output in error case

Robert Kosten 2 years ago
parent
commit
e2096d96ea
1 changed files with 4 additions and 3 deletions
  1. 4 3
      pre_commit_hooks/shellharden.sh

+ 4 - 3
pre_commit_hooks/shellharden.sh

@@ -11,7 +11,8 @@ if ! hash shellharden 2>/dev/null; then
   exit 78
 fi
 
-echo "# $@ #"
-exit 1
-
 shellharden --check "$@"
+if [[ $? -ne 0 ]]; then
+  shellharden "$@"
+  exit 2
+fi