diff options
Diffstat (limited to '.githooks')
-rwxr-xr-x | .githooks/pre-commit | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/.githooks/pre-commit b/.githooks/pre-commit index 907bebe4..2d90586c 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -1,8 +1,9 @@ -#!/bin/sh +#!/bin/bash set -e -o pipefail -if ! command -v golangci-lint &> /dev/null; then +# https://github.com/koalaman/shellcheck/wiki/SC2039#redirect-both-stdout-and-stderr +if ! command -v golangci-lint 2>&1 /dev/null; then echo "golangci-lint is not installed" exit 1 fi |