-
Notifications
You must be signed in to change notification settings - Fork 208
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
Generator seems to hang waiting for user to hit Enter to finish #10
Comments
+1 confirmed. |
Confirmed... investigated but not sure what's causing it. Still under investigation... |
For what it's worth: I've found that when you run |
Digging a bit further I found out that it's the |
I wish that was the case... it was doing this before we added the question about which client(s) you wanted. Need to look into it more. I actually see this with multiple command line tools based on Node... not just Yeoman. |
It seems to be related to the interactions of prompts between the main generator and the subgenerator. I was playing with extending the mail subgenerator and added another prompt in the sub (./mail/index.js). The stop disappeared. However my prompt was a checkbox prompt, and I couldn't interact with it. I moved it to the main generator (./app.index.js) and I could then interact with it. But the stop reappeared! So, not an answer, but maybe a clue. |
Ok, more info: If you remove the So the question is why do we have another |
Gonna sit with @andrewconnell and work through this one... |
@jasonjoh The reason we dupe the
So you can't just remove the |
Ah ok, I figured it must be something like that. Well that blows my easy fix :) |
So a couple of updates on this one. First: you don't need to duplicate the prompts. You can just keep the prompt in the subgenerator and let it do the prompting. The Second: the hang may be related to SBoudrias/Inquirer.js#266, which in itself is apparently a bug in Node.js on Windows. This explains the behavior I reported above with the new prompt (couldn't interact with a checkbox prompt). There's a state that Inquirer can get into where it pauses waiting for an Enter. @andrewconnell, have you seen this on any non-Windows machines? |
RE #1 – can you still call the generator with arguments to bypass the questions? Will they still get picked up by the sub generators? That’s the primary reason we added them to the app “top-level” generator RE #2 – interesting… but I don’t think it’s Windows related. I see it from time to time on OS X and that’s the only place I use the generator |
On #1, yes, you leave it as an option in the top-level generator, just remove the prompt. |
Using generator on Windows 10 in the following manner:
After the generator does its work, and the final line is output:
The generator seems to hang, with the cursor just flashing. If you press Enter, it will exit.
Ideally the need to hit Enter can be removed, but if it can't, the tool should tell the user they need to hit Enter to exit.
The text was updated successfully, but these errors were encountered: