-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
yarn link within a project having "bin": {"something": "./index.js"} in the package.json results in a junction being created between \Users\<user>\AppData\Local\Yarn\bin\something and the file <project>\index.js. Unfortunately windows cannot run or does not see this file.
If the current behavior is a bug, please provide the steps to reproduce.
Run the following in CMD on Windows
> mkdir yarn-test
> cd yarn-test
> @echo {"name":"yarn-test","version":"1.0.0","license":"MIT","bin":{"boo":"./index.js"}}>package.json
> @echo console.log("Aargh");>index.js
> yarn link
yarn link v1.2.1
success Registered "yarn-test".
info You can now run `yarn link "yarn-test"` in the projects where you want to use this module and it will be used instead.
Done in 0.09s.
> boo
'boo' is not recognized as an internal or external command,
operable program or batch file.
> yarn global bin
C:\Users\<user>\AppData\Local\Yarn\bin
> dir C:\Users\<user>\AppData\Local\Yarn\bin\ | findstr boo
24/10/2017 16:42 <JUNCTION> boo [C:\Users\<user>\AppData\Local\Yarn\config\link\yarn-test\index.js]What is the expected behavior?
When yarn global adding a package you get a link and a CMD wrapper for us windows users, yarn link should do the same thing. For example:
> yarn global add yes
...
> yes
y
y
y
...
> dir C:\Users\<user>\AppData\Local\Yarn\bin\ | findstr yes
24/10/2017 16:55 350 yes
24/10/2017 16:55 58 yes.cmdPlease mention your node.js, yarn and operating system version.
yarn: 1.2.1
node: v8.5.0
Windows: Microsoft Windows [Version 10.0.15063]