From dbdd763e4622fbbd11a4b92879a5de45e19fc7a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Rahir?= Date: Tue, 14 Jun 2022 07:53:42 +0000 Subject: [PATCH] [FIX] config: fix pre-commit structure The new pre-commit step added in cb1076b7 was executing bash instructions regardless of the ENV variable `HUSKY_PRE_COMMIT` which allows users to bypass the pre-commit altogether. This prevents Windows Platform users from commiting altogether as the instructions are not recognized. closes odoo/o-spreadsheet#1438 X-original-commit: 4329540f73f463e88726d9e8bf6025ab2c2eb7b6 Signed-off-by: Pierre Rousseau (pro) --- .husky/pre-commit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index a8d313a608..c9142d19ef 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,11 +1,11 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -# ativate user inputs -exec < /dev/tty if [ "$HUSKY_PRE_COMMIT" != 0 ]; then npx lint-staged + # ativate user inputs + exec < /dev/tty consoleregexp='console\.|debugger'