Skip to content

Template is still generated if a child template fails #11

@tonyvanriet

Description

@tonyvanriet

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions