From: Nicolas Boisselier Date: Tue, 8 Oct 2024 22:37:32 +0000 (+0200) Subject: .githooks/pre-commit X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=71e4a73231379f9a1230a2149bc3a16a19da82fb;p=nb.git .githooks/pre-commit --- diff --git a/.githooks/pre-commit b/.githooks/pre-commit index 92813774..2831fc94 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -10,8 +10,8 @@ echo "Run $0" if which minify > /dev/null; then MINIFY="" - [ -z "$MINIFY" ] && minify --help | grep -q '\-\-css ' && MINIFY="ext" - [ -z "$MINIFY" ] && minify --help | grep -q '\-\-output ' && MINIFY="out" + [ -z "$MINIFY" ] && minify --help 2>&1 | grep -q '\-\-css ' && MINIFY="ext" + [ -z "$MINIFY" ] && minify --help 2>&1 | grep -q '\-\-output ' && MINIFY="out" [ -z "$MINIFY" ] || git status --porcelain|sed -E 's/^ *(\?\?|[A-Z]) +//' | while read file; do ext="" case "$file" in