no gives me a green check, cancel gives me yes
Author: PrimajinCreated Jul 3, 2019Updated Dec 26, 2024
Labelsenhancement
Describe the bug
I have two unexpected behaviours regarding confirm prompts, where no gives me a green check and cancel gives me yes.
To Reproduce
Steps to reproduce the behavior:
const prompts = require('prompts');
(async () => {
const response = await prompts({
type: 'confirm',
name: 'value',
message: 'Do you want to upgrade: stuff?',
initial: true
});
console.log(response.value);
})();Given the above code:
- a
noand a green check mark on N - a
yesand a red cross on CTRL+C - a
yesand a green check mark on enter - a
yesand a green check mark on Y
Expected behavior
- a
noand a red cross on N - a
noand a red cross on CTRL+C - a
yesand a green check mark on enter - a
yesand a green check mark on Y
System
- OS: macOS 10.14.5
- Terminal: iTerm2 3.2.9
- Node version: v12.5.0

Source: terkelg/prompts