File tree 7 files changed +17
-2
lines changed
__tests__/fixtures/cache/corrupted/.yarn-cache/v4
corrupted-meta-empty/node_modules/corrupted-meta-empty
corrupted-meta-not-existing/node_modules/corrupted-meta-not-existing
corrupted-meta-typo/node_modules/corrupted-meta-typo
7 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ Please add one entry in this file for each change in Yarn's behavior. Use the sa
16
16
17
17
[ #6611 ] ( https://github.com/yarnpkg/yarn/pull/6611 ) - [ ** Jack Zhao** ] ( https://github.com/bugzpodder )
18
18
19
+ - Fixes an issue with how symlinks are setup into the cache on Windows
20
+
21
+ [ #6621 ] ( https://github.com/yarnpkg/yarn/pull/6621 ) - [ ** Yoad Snapir** ] ( https://github.com/yoadsn )
22
+
19
23
## 1.12.1
20
24
21
25
- Ensures the engine check is ran before showing the UI for ` upgrade-interactive `
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ export const YARN_INSTALLER_MSI = 'https://yarnpkg.com/latest.msi';
28
28
export const SELF_UPDATE_VERSION_URL = 'https://yarnpkg.com/latest-version' ;
29
29
30
30
// cache version, bump whenever we make backwards incompatible changes
31
- export const CACHE_VERSION = 3 ;
31
+ export const CACHE_VERSION = 4 ;
32
32
33
33
// lockfile version, bump whenever we make backwards incompatible changes
34
34
export const LOCKFILE_VERSION = 1 ;
Original file line number Diff line number Diff line change @@ -9,7 +9,9 @@ import normalizeManifest from '../util/normalize-manifest/index.js';
9
9
import { makePortableProxyScript } from '../util/portable-script.js' ;
10
10
import * as constants from '../constants.js' ;
11
11
import * as fs from '../util/fs.js' ;
12
+ import lockMutex from '../util/mutex.js' ;
12
13
14
+ const cmdShim = require ( '@zkochan/cmd-shim' ) ;
13
15
const path = require ( 'path' ) ;
14
16
15
17
export default class BaseFetcher {
@@ -77,7 +79,16 @@ export default class BaseFetcher {
77
79
}
78
80
79
81
await fs . mkdirp ( binDest ) ;
80
- await fs . symlink ( src , `${ binDest } /${ binName } ` ) ;
82
+ if ( process . platform === 'win32' ) {
83
+ const unlockMutex = await lockMutex ( src ) ;
84
+ try {
85
+ await cmdShim . ifExists ( src , `${ binDest } /${ binName } ` ) ;
86
+ } finally {
87
+ unlockMutex ( ) ;
88
+ }
89
+ } else {
90
+ await fs . symlink ( src , `${ binDest } /${ binName } ` ) ;
91
+ }
81
92
}
82
93
}
83
94
You can’t perform that action at this time.
0 commit comments