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

A hook or configuration to check the version of cookiecutter library #1921

Closed
wenjuno opened this issue Aug 15, 2023 · 1 comment
Closed

Comments

@wenjuno
Copy link

wenjuno commented Aug 15, 2023

It is great there are new features added to each release of cookiecutter library. But as I publish cookiecutter templates as plain files (via git repositories), I struggle to limit the version of the cookiecutter library users use to generate from the templates. Sometimes users can use an older version of cookiecutter and run into weird behavior. For instance, the human readable prompts is implemented in 2.2.0 and when used with older cookiecutter it will print bizarre prompts and stall the selection phase. Currently, the pre-generate hook runs after the selection phase so it doesn't help in such case. I would love to have either a pre-run hook to check or a configuration in cookiecutter.json to specify the version spec of cookiecutter (I'm thinking not just a minimum supported version but also the maximum to guard against breaking changes in newer major release of cookiecutter that don't work with older templates). Thanks.

@ericof
Copy link
Member

ericof commented Sep 22, 2023

Duplicate of #1855

@ericof ericof marked this as a duplicate of #1855 Sep 22, 2023
@ericof ericof closed this as completed Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants