Skip to content

Commit 14333d2

Browse files
committed
[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#1439 X-original-commit: 4329540f73f463e88726d9e8bf6025ab2c2eb7b6 Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
1 parent 87ee209 commit 14333d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.husky/pre-commit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
# ativate user inputs
5-
exec < /dev/tty
64

75
if [ "$HUSKY_PRE_COMMIT" != 0 ]; then
86
npx lint-staged
7+
# ativate user inputs
8+
exec < /dev/tty
99

1010
consoleregexp='console\.|debugger'
1111

0 commit comments

Comments
 (0)