We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6abbfba commit c080a40Copy full SHA for c080a40
packages/berry-core/sources/VirtualFetcher.ts
@@ -86,7 +86,15 @@ export class VirtualFetcher implements Fetcher {
86
throw new Error(`Conflicting virtual paths (current ${currentLink} != new ${target})`);
87
88
if (currentLink === undefined) {
89
- await xfs.symlinkPromise(`${target}/` as PortablePath, virtualPath);
+ // We need to check whether the target is a directory because the
90
+ // Windows symlinks are typed and we need to create the right one
91
+ const stat = await xfs.statPromise(to);
92
+
93
+ if (stat.isDirectory()) {
94
+ await xfs.symlinkPromise(`${target}/` as PortablePath, virtualPath);
95
+ } else {
96
+ await xfs.symlinkPromise(target, virtualPath);
97
+ }
98
}
99
});
100
0 commit comments