Skip to content

Commit

Permalink
Create new yeoman env to workaround issue with conflicter
Browse files Browse the repository at this point in the history
  • Loading branch information
Himavanth committed Sep 1, 2021
1 parent 7e5e1e7 commit b6679b6
Showing 1 changed file with 5 additions and 1 deletion.
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

0 comments on commit b6679b6

Please sign in to comment.