SBoudrias / Inquirer.js

A collection of common interactive command line user interfaces.
MIT License
20.12k stars 1.3k forks source link

Repetition of questions on MINGW64 #432

Open tdmalone opened 7 years ago

tdmalone commented 7 years ago

I know MINGW isn't on your list of supported consoles, but as you mentioned you're open to issues from non-supported consoles...

In MINGW32 things work great:

image

However in MINGW64, each question is repeated - firstly with the default answer in brackets plus my answer, and then just with my answer:

image

(ignore the colour differences, that's probably an issue with chalk).

If I had to hazard a guess, it's treating the modified output as a new line rather than the same line, and possibly needs just a carriage return but not a line feed? (if I have the terminology right)

SBoudrias commented 7 years ago

Given it doesn't display color, I wonder if it supports ANSI code at all. If it doesn't, then I don't think it'd ever be possible for us to support this terminal.

tdmalone commented 7 years ago

Thanks for the reply. I should've mentioned - it does support colour in other contexts (eg. git logs are coloured), but there seems to be an issue with chalk detecting that it supports colour so therefore chalk doesn't output colour (not being aware of the specifics behind it all I'm not sure whether this impacts you or not!)

tdmalone commented 7 years ago

I found a related issue for chalk: https://github.com/chalk/supports-color/issues/36. They eventually decided it's a wontfix, as I understand it they just couldn't reliably detect if it was a TTY or not.

grig0ry commented 7 years ago

@tdmalone set FORCE_COLOR property to TRUE (Properties of the system -> Additionally -> Environment variables)

tdmalone commented 7 years ago

Thanks @Grigory90! That most definitely fixes the colour issue. The double questions with Inquirer still remain, though:

image

grig0ry commented 7 years ago

@tdmalone Yes, double questions, this is problem :(

kevinzliao commented 6 years ago

Not sure if this is directly related, but in addition to the double questions, it doesn't seem like password inputs are hidden on MINGW64:

inquirer pass