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

stop-on-failure has no effect #131

Open
hmingv opened this issue Aug 5, 2022 · 2 comments
Open

stop-on-failure has no effect #131

hmingv opened this issue Aug 5, 2022 · 2 comments

Comments

@hmingv
Copy link

hmingv commented Aug 5, 2022

When the hook is a sequence of commands, execution is not stopped when the command fails.

When the first command fails, it proceeds to the next command, and if the next command did not fail, completes the commit.

image

image

@template-provider
Copy link

any updates on this? does not work for me either :-(

@Wotts
Copy link

Wotts commented Sep 26, 2023

Alternatively you can explicitly exit the individual commands. Not a fix, but a workaround for now:

"pre-commit": [
    "composer phpcs $(git diff --staged --name-only --diff-filter=ACM) || exit 1",
    "gitleaks protect -v --staged || exit 1"
]

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

No branches or pull requests

3 participants