File tree Expand file tree Collapse 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 Expand file tree Collapse file tree 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
1616
1717 [ #6611 ] ( https://github.com/yarnpkg/yarn/pull/6611 ) - [ ** Jack Zhao** ] ( https://github.com/bugzpodder )
1818
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+
1923## 1.12.1
2024
2125- 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';
2828export const SELF_UPDATE_VERSION_URL = 'https://yarnpkg.com/latest-version' ;
2929
3030// cache version, bump whenever we make backwards incompatible changes
31- export const CACHE_VERSION = 3 ;
31+ export const CACHE_VERSION = 4 ;
3232
3333// lockfile version, bump whenever we make backwards incompatible changes
3434export 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';
99import { makePortableProxyScript } from '../util/portable-script.js' ;
1010import * as constants from '../constants.js' ;
1111import * as fs from '../util/fs.js' ;
12+ import lockMutex from '../util/mutex.js' ;
1213
14+ const cmdShim = require ( '@zkochan/cmd-shim' ) ;
1315const path = require ( 'path' ) ;
1416
1517export default class BaseFetcher {
@@ -77,7 +79,16 @@ export default class BaseFetcher {
7779 }
7880
7981 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+ }
8192 }
8293 }
8394
You can’t perform that action at this time.
0 commit comments