Self-service
Describe the bug
VirtualFS.mapToBase incorrectly converts a full stop (.) to an empty string causing mkdirSync('.') to fail
|
const resolvedRoot = VirtualFS.resolveVirtual(this.baseFs.resolve(PortablePath.dot)); |
|
const resolvedP = VirtualFS.resolveVirtual(this.baseFs.resolve(p)); |
|
|
|
return ppath.relative(resolvedRoot, resolvedP); |
Originally reported by @missing1984 on Discord with this repro https://github.com/missing1984/yarn2-webpack-ts
To reproduce
await expect(packageJsonAndInstall({})).resolves.toBeTruthy();
await expect(
yarn(`node`, `-e`, `require('fs').mkdirSync('.', {recursive:true})`)
).resolves.not.toContain("no such file or directory");
Environment
System:
OS: Windows 10 10.0.19042
CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor
Binaries:
Node: 16.4.2 - ~\AppData\Local\Temp\xfs-2ddaff2b\node.CMD
Yarn: 3.0.0-rc.9.dev - ~\AppData\Local\Temp\xfs-2ddaff2b\yarn.CMD
npm: 7.19.0 - C:\nodejs\npm.CMD
Additional context
No response
Self-service
Describe the bug
VirtualFS.mapToBaseincorrectly converts a full stop (.) to an empty string causingmkdirSync('.')to failberry/packages/yarnpkg-fslib/sources/VirtualFS.ts
Lines 110 to 113 in 5869e59
Originally reported by @missing1984 on Discord with this repro https://github.com/missing1984/yarn2-webpack-ts
To reproduce
Environment
Additional context
No response