oclif/cli-ux

prompt() isn't working when both "type" and "required" params are set

Opened this issue · 1 comments

I was trying to call prompt like below, which does not work. The control stays at the line and nothing happens.
return ux.prompt('Enter ssh key file pass phrase if you have one or press enter to move on', {type: 'hide', required: false});
Although when I call prompt without the "type" but with "required" set, then it works
return ux.prompt('Enter ssh key file pass phrase if you have one or press enter to move on', {required: false});

I think this is a bug, as I can see how a user of the utility would want to implement a user input capability where both of these params needs to be set.

The same issue here. There is a bug in timeout too.