-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Bug] Yarn does not work with WSL / UNC paths #1230
Comments
This is likely a matter of adding support for such paths to |
Fixes yarnpkg#1230. Tests are included.
* feat(fslib): add support for UNC paths Fixes #1230. Tests are included. * chore(release-workflow): set releases * chore: run `yarn install` - the hashes of the ts patches changed * fix: change PortablePath representation of UNC paths * fix: change PortablePath representation of dot UNC paths
|
@Stanzilla We currently can't reproduce it - can you dig a bit and post the stacktrace for the problematic mkdir call? |
@arcanis how would I do that? |
@Stanzilla Can you try the steps below and report back?
const {npath, xfs} = require(`@yarnpkg/fslib`);
// This is an alias for `C:\\` in Windows
const drivePath = npath.toPortablePath(`\\\\?\\C:\\`);
// Your WSL path
const wslPath = npath.toPortablePath(__dirname);
console.log(drivePath);
console.log(wslPath);
// Obviously, you don't have to give us the contents of your folders, just report if there's an error when executing these
console.log(xfs.readdirSync(drivePath));
console.log(xfs.readdirSync(wslPath)); The problem is that currently we can't reproduce your issue. Both the path implementation and the fs implementation seem to work. |
|
My bad, I accidentally said "Run it in WSL 2" when I actually meant on Windows, but with the cwd inside the WSL container (Just like you originally tested Yarn when you opened the issue), so that you can test the UNC paths. |
|
Tried again today:
|
I can't reproduce the issue after #1246 got merged so I'll close this.
@Stanzilla It looks like you're trying to update to the new version using the version that doesn't support WSL paths, if I open a WSL path and run |
Describe the bug
Yarn does not work with WSL / UNC paths
To Reproduce
Run
yarn
on a project that is in a WSL container / UNC network shareScreenshots
If applicable, add screenshots to help explain your problem.
Environment if relevant (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: