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

Create new yeoman env to workaround issue with conflicter #469

Merged
merged 1 commit into from
Sep 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/commands/app/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ class InitCommand extends BaseCommand {
}

async runCodeGenerators (flags, extensionPoints, projectName) {
const env = yeoman.createEnv()
let env = yeoman.createEnv()
// first run app generator that will generate the root skeleton
const appGen = env.instantiate(generators['base-app'], {
options: {
Expand All @@ -249,6 +249,10 @@ class InitCommand extends BaseCommand {
})
await env.runGenerator(appGen)

// Creating new Yeoman env here to workaround an issue where yeoman reuses the conflicter from previous environment.
// https://github.com/yeoman/environment/issues/324

env = yeoman.createEnv()
// try to use appGen.composeWith
for (let i = 0; i < extensionPoints.length; ++i) {
const extGen = env.instantiate(
Expand Down