Skip to content
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

Possible bug: --no-emoji doesn't work in any argument order #7439

Open
iamdiogo opened this issue Jul 26, 2019 · 4 comments
Open

Possible bug: --no-emoji doesn't work in any argument order #7439

iamdiogo opened this issue Jul 26, 2019 · 4 comments

Comments

@iamdiogo
Copy link

Do you want to request a feature or report a bug?

It's a minor bug.

What is the current behavior?

I'm currently using a terminal that doesn't have emoji support, so to prevent a crash while using Yarn I use the --no-emoji flag, so I decided to add the alias yarn='yarn --no-emoji' but noticed a strange behavior.

The problem is that --no-emoji messes with the command I want to run. For example, forgetting any aliases, if I try yarn --no-emoji start, Yarn fails to detect what I wanted to do, but when I try yarn start --no-emoji it works as it's supposed to.

If the current behavior is a bug, please provide the steps to reproduce.

  1. yarn --no-emoji start
  2. Notice yarn fails to detect the start command
  3. yarn start --no-emoji
  4. Yarn correctly guesses the start command

What is the expected behavior?

The flag --no-emoji should work in any argument order it's placed on.

Please mention your node.js, yarn and operating system version.
Node v11.14.0
Yarn v1.17.3
Arch Linux

@davidsharp
Copy link

Your problem is there isn't a --no-emoji, you want --emoji=false.

Presumably Commander's failing to parse the incorrect flag and everything else your passing in is being ignored (or at least not being treated as you'd expect), which is why it's only working for yarn start --no-emoji (except emojis are probably still coming through).

@davidsharp
Copy link

Actually, scratch what I said about emojis coming through, you can likely omit --emoji=false, as it only defaults to being true in specific terminals that support it, likely why it's "working as intended" when --no-emoji is at the end.

@Hattshire
Copy link

Happening to me on Debian Bullseye (Yarn v1.22.10, Commander.js v6.2.1, Node.js v12.22.5)

@Hattshire
Copy link

I installed node-commander from debian-buster (Commander.js v2.12.2) and Yarn worked fine.

Also, on ArchLinux it runs fine (package is the yarn 1.22.17 tarball) and I think it uses Commander.js v2.16.0 (

yarn/yarn.lock

Line 1913 in 2d73345

version "2.16.0"
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants