Skip to content
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

fix: make githooks script POSIX-compliant and compatible with /bin/sh #1644

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

simonhoellein
Copy link

When functions like [[ ... ]] are used in /bin/sh, this can cause problems as this implementation is not POSIX-compliant and not official supported in /bin/sh.

The [[ ... ]] construct is a feature of bash, but /bin/sh is often a symbolic link to a shell like dash that doesn’t support [[ ... ]].

Error-messages can look like:

.githooks/commit-msg: 11: [[: not found

This can cause the commit to fail, even if the commit message would be compliant with the commit standard.

@simonhoellein simonhoellein changed the title make githooks script POSIX-compliant and compatible with /bin/sh fix: make githooks script POSIX-compliant and compatible with /bin/sh Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant