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

Yarn shows the available bin commands twice #1991

Closed
Haroenv opened this issue Nov 22, 2016 · 2 comments
Closed

Yarn shows the available bin commands twice #1991

Haroenv opened this issue Nov 22, 2016 · 2 comments
Labels

Comments

@Haroenv
Copy link
Member

Haroenv commented Nov 22, 2016

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

What is the current behavior?

Yarn shows the available commands (great feature btw) twice.

yarn run
yarn run v0.17.8
error No command specified.
info Commands available from binary scripts: coveralls, eslint, flow, jest, jsdoc, rollup, coveralls, eslint, flow, jest, jsdoc, rollup
info Project commands
   - coveralls
   - doc
   - flow
   - jest
   - lint
   - test
question Which command would you like to run?:

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

What is the expected behavior?

yarn run
yarn run v0.17.8
error No command specified.
info Commands available from binary scripts: coveralls, eslint, flow, jest, jsdoc, rollup
info Project commands
   - coveralls
   - doc
   - flow
   - jest
   - lint
   - test
question Which command would you like to run?:

Please mention your node.js, yarn and operating system version.

  • node 7.1.0
  • yarn 0.17.8
  • macOS 10.12.1
@hpurmann
Copy link
Contributor

hpurmann commented Nov 23, 2016

Oh, this bug is even mentioned in the test. I think this can be a good first bug for anyone starting to contribute to yarn. Essentially, the problem arises because of the npm and yarn registry looking both in node_modules. An additional check on registry's binary paths is needed.

@DenisGorbachev
Copy link
Contributor

Hey, I've fixed this via #2019 - could you please check it?

torifat pushed a commit that referenced this issue Nov 25, 2016
* Fix duplication of available bin commands (#1991)

* Fix lint errors

* Move the code out into a separate for-loop

* Revert "Move the code out into a separate for-loop"

This reverts commit a968fd0.

* Use Set instead of Array for performance reasons (#1991)
@torifat torifat closed this as completed Nov 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants