lirantal/is-website-vulnerable

Output breaks in ZSH

aylacullen opened this issue · 10 comments

Current Behavior:
Displays certain characters incorrectly. Missing font on my part, perhaps?

image

Your Environment

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.6 LTS"
node --version: v12.11.1
shell: /bin/bash (zsh)

Ran this using ConEmu (v190526 [64] {Preview}).

Additional note: Ubuntu is running via WSL. Windows version is Microsoft Windows [Version 10.0.18362.388]

Good point. I'll see if it's possible to detect terminal support for these characters and have a fallback.

Just incase it helps I'm using zsh on MacOS 10.14.5 and not seeing the missing characters. Could still be a font or character set issue though. :)

Uhmm, possibly related to ConEmu..?

@doncullen could you run these 2 commands and tell me both of their exit status codes?

npx supports-color-cli --16m and npx supports-color-cli --256

image

What'd the best way of getting the exit code be?

Oh sorry for missing that, you need to run echo $? after every command, so basically:

npx supports-color-cli --16m
echo $?
npx supports-color-cli --256
echo $?

Ran it, --16m returned 1, --256 returned 0.

Thanks that's useful. I'll see if we can find a way to detect if the terminal supports those escape characters that are being used and fallback to something else

@doncullen looks like this is some issue with ConEmu that is actually supporting UTF8 but I think the font it has to render the chars doesn't map correctly. Can you check if using a different terminal works? or perhaps the settings on ConEmu? https://conemu.github.io/en/UnicodeSupport.html

Happy to know if you're able to figure out and what solved it

I'll close for now but you're welcome to chime in and update.