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

preserves original options in _cookiecutter #1874

Merged
merged 3 commits into from
Jul 1, 2023
Merged

preserves original options in _cookiecutter #1874

merged 3 commits into from
Jul 1, 2023

Conversation

kjaymiller
Copy link
Contributor

fixes #1873

Change to cookiecutter.main.py in cookiecutter() that saves all the original context key:value pairs in context['_cookiecutter'] before overwriting them in context['cookiecutter'].

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

created a new fake-repo directory to add custom key:value pairs to ensure that lists, and dictionaries retained all their values.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modified the cli echo error output test to no longer rely on exact JSON serialization as result.output was flaky and now also contained _cookiecutter

@ericof ericof requested review from kurtmckee and ericof June 30, 2023 19:27
@ericof ericof added the enhancement This issue/PR relates to a feature request. label Jun 30, 2023
@ericof ericof modified the milestones: 3.0.0, 2.2.0 Jun 30, 2023
Copy link
Member

@ericof ericof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution

@ericof ericof merged commit f177c7c into cookiecutter:main Jul 1, 2023
21 checks passed
@noklam
Copy link

noklam commented Nov 10, 2023

Is it possible to reference this _cookiecutter variable? I tried {{ _cookiecutter.var }} and seems like I get the same thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This issue/PR relates to a feature request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

getting a parameters original choices
3 participants