diff options
author | Valery Piashchynski <[email protected]> | 2023-03-09 17:20:05 +0100 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2023-03-09 17:20:05 +0100 |
commit | 6063c0f9ff454282cbe6c452ec4022684e886ac3 (patch) | |
tree | c3c69ca0ed215acd2c77c2d5e763e63348190ddd /.githooks | |
parent | bc5079e0b72f5731245be8387d2cc7defe0a8c07 (diff) |
chore: correct pre-commit bash
Signed-off-by: Valery Piashchynski <[email protected]>
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 |