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

Template is still generated if a child template fails #11

Open
tonyvanriet opened this issue Jun 15, 2018 · 3 comments
Open

Template is still generated if a child template fails #11

tonyvanriet opened this issue Jun 15, 2018 · 3 comments

Comments

@tonyvanriet
Copy link

We ran into some confusion when we attempted to generate one of our hierarchical templates into an existing directory.

This template has 3 layers of hierarchy. The lowest-level template failed with Error: Updating an existing project is not yet supported but the rest of the child templates proceeded to generate successfully because the maybe_invoke_based_on func sets the :force option after generating a based_on template.

This made it appear like the gen was successful and it took some time to realize why some things were missing from the generated output.

Perhaps there are some use cases where this is desirable, but from my perspective, I'd prefer to see the mix task fail more completely when any of the templates fail to generate.

@tonyvanriet
Copy link
Author

Hi @pragdave
Have you had any chance to consider this issue and the proposed fix?
We've been using our fork for the last month with good results.
Thanks.

@pragdave
Copy link
Owner

pragdave commented Jul 18, 2018 via email

@the-mikedavis
Copy link

@pragdave my PR should only remove the prior entry in .mix/templates/<template-name>. I think @tonyvanriet is talking about raising errors gen-ing into previously existing projects rather than template.install-ing over previously existing templates.

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

Successfully merging a pull request may close this issue.

3 participants