summaryrefslogtreecommitdiff
path: root/.githooks
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2023-03-09 17:20:05 +0100
committerValery Piashchynski <[email protected]>2023-03-09 17:20:05 +0100
commit6063c0f9ff454282cbe6c452ec4022684e886ac3 (patch)
treec3c69ca0ed215acd2c77c2d5e763e63348190ddd /.githooks
parentbc5079e0b72f5731245be8387d2cc7defe0a8c07 (diff)
chore: correct pre-commit bash
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to '.githooks')
-rwxr-xr-x.githooks/pre-commit5
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