This is because the default bash version on a mac OS seems to be 3.2.57. With this version, local doesn't accept any option and declare doesn't accept -n option, that are present in bash 5.
I cannot found this requirement in the documentation.
die not found
If I install latest bash with homebrew (i.e. bash 5.2) on the same machine, die is not present:
❯ curl -sL https://raw.githubusercontent.com/gabyx/githooks/main/scripts/install.sh | bash -s -- -- \
--dry-run
main: line 105: die: command not found
I think this is because a wrong uname -p command for arm64 architecture that returns arm insted of expected arm64, I will create a PR.
Just to report some problems that may prevent an easy installation of
Githooks
on a mac os with ARM.Description
Installer Dependencies
On a mac os (13.5.1 with arm64), during the installation with the provided script I get the following error:
This is because the default bash version on a mac OS seems to be 3.2.57. With this version,
local
doesn't accept any option anddeclare
doesn't accept-n
option, that are present in bash 5.I cannot found this requirement in the documentation.
die
not foundIf I install latest bash with homebrew (i.e. bash 5.2) on the same machine,
die
is not present:I think this is because a wrong
uname -p
command for arm64 architecture that returnsarm
insted of expectedarm64
, I will create a PR.