From c6e50f8d063cb9ece5751c6eabd2f833c6f5fdbb Mon Sep 17 00:00:00 2001 From: Nicolas DUBIEN Date: Tue, 21 Apr 2020 19:33:17 +0200 Subject: [PATCH] Symlink creation fails on windows Switching to type=junction seems to fix the issue. Here is a related ticket on node: https://github.com/nodejs/node/issues/18518 --- e2e/Utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/e2e/Utils.ts b/e2e/Utils.ts index 614831acae17..a162297d3d1b 100644 --- a/e2e/Utils.ts +++ b/e2e/Utils.ts @@ -47,7 +47,7 @@ export const linkJestPackage = (packageName: string, cwd: Config.Path) => { const destination = path.resolve(cwd, 'node_modules/', packageName); makeDir.sync(destination); rimraf.sync(destination); - fs.symlinkSync(packagePath, destination, 'dir'); + fs.symlinkSync(packagePath, destination, 'junction'); }; export const makeTemplate = ( @@ -105,6 +105,7 @@ export const writeSymlinks = ( fs.symlinkSync( path.resolve(directory, ...fileOrPath.split('/')), path.resolve(directory, ...symLinkPath.split('/')), + 'junction', ); }); };