-
Notifications
You must be signed in to change notification settings - Fork 278
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
Hitting CTRL+C while in Inquirer prompt breaks everything #42
Comments
Yikes! Okay will check out. |
Hi Team, Is above issue solved? |
Issue is still present. |
Hey Scott - sorry I haven't been very active recently. A lot of things are changing in life right now, so I haven't had too much time for OSS. Hope to get back fairly soon and close all these issues. Otherwise, all your help's been very appreciated. I wouldn't mind adding you to the Vorpal team, if you're down with that. |
Don't worry about it; that's how open source is sometimes. You contribute I would appreciate the abilities to accept pull requests and deploy code to |
Okay Scott, giving you access now. Feel free to make any patches you need, obviously add tests as you go. Just check with me before committing anything that alters the API, or any breaking changes. Thanks for all your help! |
Okay this should be good now. Can you please try it? |
No luck.
|
Can you show me the code with the inquirer prompt? |
// Login command only available in CLI, requires user input.
vorpal
.command('login [userKey] [userSecret]')
.description('Set user key and user secret key.')
.action(function(args, callback) {
this.prompt([
{
type: 'input',
name: 'userKey',
message: 'User key: ',
validate: (input) => {
return input.length > 10;
}
},
{
type: 'input',
name: 'userSecret',
message: 'User secret key: ',
validate: (input) => {
return input.length > 20;
}
}
], (answers) => {
self.userKey = self.commands.userKey = answers.userKey;
self.userSecret = self.commands.userSecret = answers.userSecret;
callback();
});
});
} |
Thanks. Checking it out. |
Oh - haha - it only breaks on multi-inputs. Looks like the Inquirer cancellation doesn't handle an array of inputs. |
Ugh. Cancelling inquirer prompts is literally the messiest part of my code, because Inquirer doesn't support command cancellation, so I have to hack it. This is going to take longer to fix. |
Running into this as well... where's the like button? 👍 |
Got it. This one's... gnarly. Will try to work on it some more soon. |
This problem still exists and breaks the REPL |
The output looks like this:
You can still type but nothing happens. Only way to recover is hitting CTRL+C again.
The text was updated successfully, but these errors were encountered: