Closed SamVerschueren closed 8 years ago
@sindresorhus any idea?
Might be related to lots of flakiness with readline in recent Node.js versions. See: https://github.com/sindresorhus/fkill-cli/issues/4#issuecomment-143963835.
It's a GUI interface (Visual Studio Code), so probably not related. Probably something regarding not correctly exiting a generator.
Oh, I thought I was on a different repo...
Maybe @sboudrias would know.
@SamVerschueren does it work if you just run two generators one after the other?
Might be an issue with grouped-queue being stopped or jammed waiting for an async callback.
@SBoudrias this does not work either, can only run one generator. Is this something I can fix in my code or should it be done somewhere else?
Sorry to ping you back @SBoudrias, but want this to be resolved before the public release of VS Code Extensions.
So this is not happening because the callback is not called with an answer object here: adapter.ts#L43-L53?
Something I might find interesting, is that the on('end')
of the environment is not called when quiting the generator early, which happens here: yo.ts#L75.
PS. I will understand if you don't have the time right now to look into this :).
@SamVerschueren yeah, I don't know how you're quitting early, but this is clearly a problem with the state not being reset clean.
Maybe you should explore alternative strategy? Like running yeoman in sub process where quitting early means killing the whole process.
I would recreate the Yeoman instance, I had a similar problem with atom. Basically the yeoman environment needs to be reset. https://github.com/SamVerschueren/vscode-yo/blob/master/src/extension.ts#L9
Everyone, thanks for the input, got it working by recreating Yeoman
as @david-driscoll suggested.
The plugin does not execute a new generator if the user pressed escape in the previous flow.
When the user starts a new generation and presses esc at some question, the flow is stopped. When he triggers a new generator, the environment is executed correctly on line 67, but the
prompt
method is not fired.Does this have something to do with not calling the callback here?