-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow emojis to be force enabled with --emoji
.
#3126
Conversation
Test failures appear to be unrelated to the changes in this PR (tests are failing in the master from which I branched this). |
56d450d
to
bef14fb
Compare
The previous behaviour had a default of enabling emojis for Macs, and allowed explicitly disabling them. This PR keeps that default but allows `--emoji` to enable for other platforms if the user wants to. `--no-emoji` still works as before, but due to the way that commander processes "--no-" flags (forcing the default to true and overwriting the default value given in the `.option` definition) it was necessary to switch the flag definition from `--no-emoji` to `--emoji`.
Worked around the flow problems with |
I think this will make emoji off by default, we have them on by default on Mac. |
@bestander, this PR keeps the default behaviour as is - enabled for Mac, disabled for the rest.
The third option to |
Sorry, did not notice :) |
Thanks for the PR. |
NP, thanks for the merge, now I will no longer have emoji envy :D 🎉 |
The previous behaviour had a default of enabling emojis for Macs, and
allowed explicitly disabling them.
This PR keeps that default but allows
--emoji
to enable for otherplatforms if the user wants to.
--no-emoji
still works as before, butdue to the way that commander processes "--no-" flags (forcing the
default to true and overwriting the default value given in the
.option
definition) it was necessary to switch the flag definition from
--no-emoji
to--emoji
.Summary
Allows users to enable emojis on non-darwin platforms.
Emojis are a nice feature but are explicitly disabled on non-darwin platforms. There appears to be some interest in having them on other plaforms (see #960) and this allows that by making
--emoji
work as you'd expect (--no-emoji
and--emoji
are already accepted, but only--no-emoji
works).Test plan
On linux
Note that there is a flow type error in this PR related to
process.stdout.isTTY
, however this PR didn't add that check; it seems like it's a flow error that it wasn't already failing (I'm not familiar with flow though, so happy to be corrected here).Another tweak would be to shift the
process.stdout.isTTY
check into the default value forcommander.emoji
, which would allow users to force emoji output even ifstdout
isn't a TTY - I'm not sure if this is ever desirable, but it's not possible to override at the moment and the change is simple.