let env = yeoman.createEnv()
// first run app generator that will generate the root skeleton
const appGen = env.instantiate(generators['base-app'], {
options: {
'skip-prompt': flags.yes,
'project-name': projectName
}
})
await env.runGenerator(appGen)
// Creating new Yeoman env here to workaround an issue where
// yeoman reuses the conflicter from previous environment.
// env = yeoman.createEnv()
const extGen = env.instantiate(
extensionPoints[i].generator,
{
options: {
'skip-prompt': flags.yes,
// do not prompt for overwrites
force: true
}
})
await env.runGenerator(extGen)
Now, at the last line, extGen should have run with new options which include force but it doesn't because the previous conflicter is used. https://github.com/yeoman/environment/blob/main/lib/environment.js#L1013
I think a new conflicter should be re-created if env is re-instantiated because the force parameter is a part of instantiation options.
Sample code
Now, at the last line, extGen should have run with new options which include
force
but it doesn't because the previous conflicter is used. https://github.com/yeoman/environment/blob/main/lib/environment.js#L1013 I think a new conflicter should be re-created if env is re-instantiated because the force parameter is a part of instantiation options.