You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -157,6 +157,21 @@ In order to run scripts that require the use of a scripting language, use the fo
// ...
```
## Bash
Hook scripts need to be POSIX compliant to ensure best compatibility as not everyone has `bash` (e.g. Windows users).
That being said, if your team doesn't use Windows, you can use Bash this way:
```shell
# .husky/pre-commit
bash << EOF
# Put your bash script inside
# ...
EOF
```
## Node Version Managers and GUIs
If you're using Git hooks in GUIs with Node installed via a version manager (like `nvm`, `n`, `fnm`, `asdf`, `volta`, etc...), you might face a `command not found` error due to `PATH` environment variable issues.