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

pre-commit hook fails #2

Open
karlschriek opened this issue Mar 17, 2020 · 1 comment
Open

pre-commit hook fails #2

karlschriek opened this issue Mar 17, 2020 · 1 comment

Comments

@karlschriek
Copy link

Hey, thanks for this pre-commit hook, it looks really useful!

Unfortunately I haven't been able to get it working. If I run pre-commit run --all-files it does actually seem to execute (all of my .ipynb files get changed), but the task returns a "Failed" state without any explanation for the failure:

jupyter-notebook-cleanup.................................................Failed
- hook id: jupyter-notebook-cleanup
- files were modified by this hook

So even though the changes have been make the commit will not go through since a failed state has been returned.

@Rjdrenth
Copy link

When a pre-commit hook makes any changes (regardless of whether it's this hook or any other), it will fail. However, after that initial run, you should be able to run pre-commit run --all-files again and the jupyter-notebook-cleanup hook should pass.

In short, the status Failed is an indication whether or not the hook made any changes. If it didn't make changes, it will pass.

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

2 participants