husky icon indicating copy to clipboard operation
husky copied to clipboard

HUSKY=0 does not stop Husky on Windows

Open johan-byggtjanst opened this issue 1 year ago • 2 comments

** Problem ** When using Husky on Windows and setting HUSKY=0 the pre-push hooks should not run but they did.

Context

  • Using Windows terminal.
  • Husky 8.0.3

This should be possible to test with just a pre-push hook that does "echo The pre-push hook ran".

Thank you!

johan-byggtjanst avatar Aug 29 '24 09:08 johan-byggtjanst

Seems surprising. I would maybe suggest trying to upgrade and verify that the env variable was correctly set by adding echo $HUSKY in your pre-push

typicode avatar Sep 03 '24 15:09 typicode

I have similar problem with husky v9.1.6 on windows. Even with husky=0 it will still run hooks.

Also need to add #!/usr/bin/env sh to my pre-commit or it randomly run to an error: cannot spawn .husky/pre-commit: No such file or directory

Screenshot_22

AaaStrky avatar Oct 17 '24 15:10 AaaStrky