Yarn: Disable emojis if terminal isn't a TTY

Created on 22 Sep 2016  路  14Comments  路  Source: yarnpkg/yarn

No fun allowed.

Most helpful comment

@kittens What about Linux? I want the emoji there...

All 14 comments

We should likely disable them on Windows as well. yarn install is pretty jank on Windows in general for various reasons.

If TTY is the standard way to check that's cool. I'd like to avoid straight platform sniff if possible so that it will light up when emoji support is added to Windows. It would also give Windows an indicator they could use to signal support.

I think @sindresorhus has experience in this area.

We should likely disable them on Windows as well.

Emoji are small and ugly in the command prompt (compared to the nice colour ones in the GUI), but they do work:
cat

Are there bugs specifically with Node.js around Emoji?

Can you provide your powershell script.

It's shown in the screenshot - Literally just this:

锘縒rite-Output '馃悎'

Cool, here's my output:

Here's a bit more on it https://github.com/sindresorhus/emoj/issues/5.

Ahh, I think I know what's up. I'm using Cmder rather than the default Windows terminal. It might use UTF-8 by default, or support Emoji while the default cmd.exe doesn't.

Here's Cmder on my system:

There's an open issue to support emojis in Cmder's dep https://github.com/Maximus5/ConEmu/issues/554.

I'm super confused as to how it's working in Cmder for me then! 馃槅

This is on my home PC, I'll try my work laptop later and see if it works there too.

@kittens Is the platform sniff :100: needed?

@jdalton @Daniel15 I think it's certainly possible to construct some configuration on Windows where the emojis work, but it's sufficiently common in practice for them to fail on Windows that I think we should leave it off until we have a great way of reliably detecting that it'll work.

@kittens What about Linux? I want the emoji there...

On windows this should be definitely supported:
https://github.com/Microsoft/console/issues/190

@DRSDavidSoft Based on that thread, it sounds like Windows support isn't fully complete yet.

Was this page helpful?
0 / 5 - 0 ratings