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 cb1076b 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 #1437

X-original-commit: 4329540
Signed-off-by: Pierre Rousseau (pro) <[email protected]>
  • Loading branch information
rrahir committed Jun 14, 2022
1 parent 7c896bc commit 24ed294
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 24ed294

Please sign in to comment.