We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The pre-commit hook is skipped when commit contains only deleted files.
pre-commit
1.10.1
pre-commit: commands: "hello": run: echo "hello world"
Pre-commit hook should run.
Pre-commit hook does not run.
I tried using files as defined here
files
pre-commit: commands: "hello": files: git diff --staged --name-only run: echo "hello world"
But that did not change the outcome. Perhaps the pre-commit hook does not consider this option, but should.
╭───────────────────────────────────────╮ │ 🥊 lefthook v1.10.1 hook: pre-commit │ ╰───────────────────────────────────────╯ sync hooks: ✔️ (pre-commit) │ hello (skip) no files for inspection
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
🔧 Summary
The
pre-commit
hook is skipped when commit contains only deleted files.Lefthook version
1.10.1
Steps to reproduce
pre-commit
hook defined (eg echo "hello world")Expected results
Pre-commit hook should run.
Actual results
Pre-commit hook does not run.
Possible Solution
I tried using
files
as defined hereBut that did not change the outcome. Perhaps the pre-commit hook does not consider this option, but should.
Logs / Screenshots
The text was updated successfully, but these errors were encountered: