thomasthiebaud / poetry-githooks

Simple git hooks with poetry
MIT License
15 stars 3 forks source link

Make `githooks run` require the `--name` argument #6

Closed rotu closed 4 years ago

rotu commented 4 years ago

Previously, not passing a hook name would result in trying to execute a hook named None:

githooks run
No hooks called None found. Add a [tool.githooks] section to your pyproject.toml with the desired hook

Now, this fails earlier with a more intuitive message:

 githooks run
Usage: githooks run [OPTIONS] [ARGS]...
Try 'githooks run --help' for help.

Error: Missing option '--name'.  Choose from:
    applypatch-msg,
    pre-applypatch,
    post-applypatch,
...
thomasthiebaud commented 4 years ago

Nice! Thanks for your contribution

rotu commented 4 years ago

You're very welcome! Thanks for making this very useful project!