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

The "exec" CLI command is undocumented #7882

Closed
ethanherbertson opened this issue Feb 5, 2020 · 3 comments
Closed

The "exec" CLI command is undocumented #7882

ethanherbertson opened this issue Feb 5, 2020 · 3 comments
Labels
fixed-in-modern This issue has been fixed / implemented in Yarn 2+.

Comments

@ethanherbertson
Copy link

Bug description

In short, the "exec" CLI command, which lets you run locally-installed executables as though node_modules/.bin was included in your PATH, is undocumented both in the CLI help system and in the online documentation, despite being (a) functional, (b) valuable, and (c) listed in the output of yarn help as an available command.

NOTE: This issue is basically the same as what was reported in #7172, but the report was a little confused and it got closed.

Command

yarn help exec

What is the current behavior?

Yarn outputs the usage/info for the "help" command instead of the "exec" command.

What is the expected behavior?

Yarn explains what the "exec" command does.

Because it's undocumented, I can only provide my loose understanding of what it does here:

  1. It looks for the given executable as though node_modules/.bin had been added to your existing PATH environment variable
  2. It prints the current version of yarn
  3. If the command succeeds, it prints the output and a "Done in X.XXs" line.
  4. If the command fails, it reports the error code, the command, and any arguments that were provided to it.

Steps to Reproduce

  1. yarn help exec (The usage for yarn's "help" command will incorrectly be printed.)
  2. Navigate to the reported "https://yarnpkg.com/en/docs/cli/exec" URL in your browser. (You will get a 404.)

Environment

  • Node Version: v10.16.0
  • Yarn v1 Version: 1.21.1
@ethanherbertson
Copy link
Author

See also this comment: #3937 (comment)

@memark
Copy link

memark commented Aug 26, 2020

yarn exec -h shows a page ending with

Visit https://yarnpkg.com/en/docs/cli/exec for documentation about this command.

That web page does not even exist.

@paul-soporan
Copy link
Member

Closing this as fixed in v2 (where the exec command doesn't look inside node_modules/.bin anymore): https://yarnpkg.com/cli/exec

https://yarnpkg.com/getting-started/migration

@paul-soporan paul-soporan added the fixed-in-modern This issue has been fixed / implemented in Yarn 2+. label Jan 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed-in-modern This issue has been fixed / implemented in Yarn 2+.
Projects
None yet
Development

No branches or pull requests

3 participants