Skip to content

Commit

Permalink
[FIX] config: fix pre-commit structure
Browse files Browse the repository at this point in the history
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) <[email protected]>
  • Loading branch information
Topdev97 committed Jun 14, 2022
1 parent 5573bef commit 292b959
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -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'

Expand Down

0 comments on commit 292b959

Please sign in to comment.