Closed ThatOneCalculator closed 2 years ago
This is happening for me as well, but only when the question ends with \n
or \t
This is happening for me as well, but only when the question ends with
\n
or\t
Yeah. I'm just using sync-prompt now lol.
don't use \n
.
@ThatOneCalculator @jsjain
I need to show a new line after displaying the question.
I need to show a new line after displaying the question.
for next command?
no for users to enter answer to the question
It happens here in windows when I use the git prompt or the powershell.
no for users to enter answer to the question
Use another console.log for that
If it's not clear to people, this is what I did:
const prompt = require('prompt-sync')();
console.info('Are you sure you want to continue? (y/N)');
if (prompt('> ').toLowerCase() !== 'y') {
logger.info('Exiting!');
process.exit(1);
}
I have the same issue when the prompt question is too long (even without an explicit \n.
let foo = prompt("Great, the field will be 10x10. How many percent do you want to be covered in mines? (Enter a number between 1 - 60): ")
creates the same issue.
Point being don't use this package. Please stop pinging me with this it's been literally a year geez