Open mikemadison13 opened 2 years ago
@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". I'm not sure yet how related this might be to any changes done here. But I am using ZSH on my mac on Monterrey version 12.3.1. It seems like the issue is something that was introduced in BLT 13.4 because it works fine on 13.3. What changed that could be stepping on git precommit hooks?
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
"${ROOT_DIR}"/vendor/bin/blt internal:git-hook:execute:pre-push
to
ddev exec blt internal:git-hook:execute:pre-push
In pre commit a similar change has no effect. I still receive the error below.
Untracked files are present, this may impact the validity of pre-commit checks.
env: php: No such file or directory
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.