Skip to content

Commit e377551

Browse files
authored
Junction don't copy
Copying the files on windows is very slow and can be avoided by using junctions
1 parent 6b5e0e2 commit e377551

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/pip.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -610,10 +610,9 @@ function installAllRequirements() {
610610
!fse.existsSync(symlinkPath) &&
611611
reqsInstalledAt != symlinkPath
612612
) {
613-
// Windows can't symlink so we have to copy on Windows,
614-
// it's not as fast, but at least it works
613+
// Windows can't symlink so we have to use junction on Windows
615614
if (process.platform == 'win32') {
616-
fse.copySync(reqsInstalledAt, symlinkPath);
615+
fse.symlink(reqsInstalledAt, symlinkPath, 'junction');
617616
} else {
618617
fse.symlink(reqsInstalledAt, symlinkPath);
619618
}

0 commit comments

Comments
 (0)