Do you want to request a feature or report a bug?
bug
What is the current behavior?
Since v1.11.0 Yarn now also creates bin links in each module directory. This was introduced in the Plug 'n Play feature (#6382) I believe. On windows these specific bin links are currently broken. They are junction style links from file to file, which is invalid according to the Microsoft link documentation. In my case this doesn't directly break Yarns functionality because I'm not using the Plug 'n Play feature that introduced these files, however it does most likely break that functionality on Windows. It does however also break other tools, because invalid filesystem entries are being created which are unreadable.
If the current behavior is a bug, please provide the steps to reproduce.
Just executing 'yarn' to fetch modules will do the trick on Windows. My belief is that the code added to 'base-fetcher.js' in the Plug 'n Play feature causes the bad links on Windows. It seems like it doesn't take into account Yarn is being ran on Windows like the 'linkBin' function in 'package-linker.js' does. I'm however not into the Yarn source enough to attempt a fix myself.
What is the expected behavior?
Yarn should probably create the links in question using 'cmdShim' like 'linkBin' in 'package-linker.js' does instead of the junction style links which are invalid on Windows.
Please mention your node.js, yarn and operating system version.
Node: v10.13.0, Yarn v1.12.1, Windows 10
Can confirm, this is currently breaking our build system because Gradle cannot read the paths with these broken links
Duplicate of https://github.com/yarnpkg/yarn/issues/6585 ?
Another case: breaks docker-compose using volumes on Windows:
NotADirectoryError: [WinError 267] The directory name is invalid: ''...\\node_modules\\stylelint\\.bin\\stylelint'
When a fix can be expected?
It's already fixed on master, I plan to make the release tomorrow. I've only got one more PR to check before being able to do the branch cut.
Most helpful comment
It's already fixed on master, I plan to make the release tomorrow. I've only got one more PR to check before being able to do the branch cut.