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 link should create a global symlink to the binary #3639

Closed
75lb opened this issue Jun 14, 2017 · 3 comments
Closed

yarn link should create a global symlink to the binary #3639

75lb opened this issue Jun 14, 2017 · 3 comments

Comments

@75lb
Copy link

75lb commented Jun 14, 2017

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

Request a feature.

What is the current behavior?

yarn link does not register the binary as a global symlink the way npm link does.

What is the expected behavior?

Running yarn link should create links to both the package main file and the bin file, the same way npm link does.

So, if my package.json contains a bin file, e.g.

{
  "bin": {
    "example": "./bin/cli.js"
  }
}

... then running yarn link should symlink bin/cli.js as example in my global bin folder, making example a global command.

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

$ node -v && yarn --version && sw_vers
v8.1.1
0.24.5
ProductName:	Mac OS X
ProductVersion:	10.12.5
BuildVersion:	16F73
@75lb 75lb changed the title npm global link alternative yarn link should create a global symlink to the binary Jun 14, 2017
@bestander
Copy link
Member

PR is welcome, the code is here https://github.com/yarnpkg/yarn/blob/master/src/cli/commands/link.js

@vichle
Copy link

vichle commented Oct 8, 2017

This was fixed in #3721.

@arcanis arcanis closed this as completed Oct 17, 2017
@TimNZ
Copy link

TimNZ commented Feb 8, 2018

I'm running 1.3.2 and I don't get global bin created after doing yarn link.
npm link works as expected.

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

No branches or pull requests

5 participants