alirezanet / Husky.Net

Git hooks made easy with Husky.Net internal task runner! 🐶 It brings the dev-dependency concept to the .NET world!
https://alirezanet.github.io/Husky.Net/
MIT License
632 stars 29 forks source link

Support broader environmental global skip flag #32

Closed Xemrox closed 2 years ago

Xemrox commented 2 years ago

Details

In an MSBuild environment its quite common to set variables to false instead of 0. Therefore I recommend to add a test to the $env:HUSKY variable for some kind of false in order to skip husky execution.

Xemrox commented 2 years ago

Late to the party but I also found this in the original husky documentation. https://typicode.github.io/husky/#/?id=with-env-variables Which states Husky.Net should probably check for a set $CI too.

alirezanet commented 2 years ago

Hi, thanks for the PR. I'll close this issue for now, but you can open another one about $CI if you feel we need to implement it.

this issue is fixed due to PR #33.