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
feat: Pass errors from pre/post-gen hook(s) to the FailedHookException message #1829
base: main
Are you sure you want to change the base?
feat: Pass errors from pre/post-gen hook(s) to the FailedHookException message #1829
Conversation
…xception message If cookiecutter functions are called in python code, it is useful to catch possible errors appearing during the execution of cookiecutter pre/post-generate hooks. modified: cookiecutter/hooks.py to: * catch possible errors from the subprocess calling hook scripts * add these errors in the FailedHookException message The change is not breaking, all tests run to 100% coverage Co-authored-by: vykozlov
modified: * ../.pre-commit-config.yaml : "gitlab.com/com/pycqa/flake8" => github.com/pycqa/flake8 as the repo at "gitlab.com" does not exist * hooks.py : to comply with pep8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vykozlov I've left feedback. Thanks for your work on this!
Would you add a test to demonstrate this new feature?
Co-authored-by: Kurt McKee <contactme@kurtmckee.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vykozlov Could you please add a test?
If cookiecutter functions are called in python code, it is useful to catch possible errors appearing during the execution of cookiecutter pre/post-generate hooks.
modified: cookiecutter/hooks.py to:
The change is not breaking, all tests run to 100% coverage
Co-authored-by: vykozlov