-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DX-5101: Git Hooks Incompatible with zsh #4496
Comments
@mikemadison13 it shouldn't matter what your default shell is, as long as Bash is installed on your machine. Are you saying that Bash is no longer installed at all on M1 Macs? That would be a massive breaking change, considering half the shell scripts in the world require Bash. |
i'm pretty sure bash is on the machine, but given that my new M1 came pre-configured with ZSH all of the BLT git hooks were failing. i'm open to other ideas, but i think "having" bash and "using" bash could be the disconnect here. |
I use ZSH on my non-M1 Mac and have never had an issue with the shell scripts. The whole point of the shebang is to specify the interpreter, it's often not even a shell but NodeJS or PHP. Obviously you don't use PHP as your shell, but PHP scripts defined this way should still run fine 😄 Can you be more specific about the error you're seeing? |
I'll see if I can reproduce, they seem to be working today 🤦 |
So githooks started failing for me recently. Specially the precommit "Validating commit message syntax". |
BLT Version 13.7.4.0 I have the githook issue also. New Macbook running Sonoma 14.4. Existing project using ddev. Working fine on older machine. I can get the pre-push hook working by changing
to
In pre commit a similar change has no effect. I still receive the error below.
There are no untracked files. |
Describe the bug
The default BLT git hooks (in https://github.com/acquia/blt/tree/main/scripts/git-hooks) explicitly define bash as the scripting engine, which causes them to fail on zsh terminals.
To Reproduce
Steps to reproduce the behavior, ideally starting from a fresh install of BLT:
I think that ideally BLT would provide a shell variable that lets us differentiate between bash or zsh hooks and make the path to the hooks dynamic.
The text was updated successfully, but these errors were encountered: