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 f4738df commit 36d73ccCopy full SHA for 36d73cc
src/util/fs.js
@@ -148,7 +148,13 @@ export async function symlink(src: string, dest: string): Promise<void> {
148
}
149
150
try {
151
- await fsSymlink(src, dest, "junction");
+ if (process.platform === "win32") {
152
+ // use directory junctions if possible on win32, this requires absolute paths
153
+ await fsSymlink(src, dest, "junction");
154
+ } else {
155
+ // use relative paths otherwise which will be retained if the directory is moved
156
+ await fsSymlink(path.relative(path.dirname(dest), src), dest);
157
+ }
158
} catch (err) {
159
if (err.code === "EEXIST") {
160
// race condition
0 commit comments