husky
husky copied to clipboard
feat: add env as a variable to give to husky to set the environment it is run in
This PR enables users to add as argument to the install script the environment the scripts run in.
An example of this is to run in bash
instead of sh
.
This PR does not include the scope of optional single args, however so it must be provided as a second argument to the dir.
Example usage yarn run prepare .husky bash
or apply directly in the prepare
section of the package.json
This allows us to specify zsh
as well as other shell environments.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Bumpy
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
One more bump
Thanks for the PR. However, not all shells are available. In particular on Windows.
So this feature could create issues for users. For better or worse, sh
is one you can expect to work everywhere.
If you're working in a team where the available shells are known beforehand, you can instead have:
# husky/pre-commit
# ...
bash some_script