Skip to content

Commit 31aa1a6

Browse files
committed
fix: fix yarn_install yarn cache mutex bug
1 parent 1f902bf commit 31aa1a6

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

internal/npm_install/pre_process_package_json.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,11 @@ function clearYarnFilePathCaches(pkg) {
8686

8787
if (clearPackages.length) {
8888
if (DEBUG) console.error(`Cleaning packages from yarn cache: ${clearPackages.join(' ')}`);
89-
90-
child_process.execFileSync(
91-
'yarn', ['cache', 'clean'].concat(clearPackages),
92-
{stdio: [process.stdin, process.stdout, process.stderr]});
89+
for (const c of clearPackages) {
90+
child_process.execFileSync(
91+
'yarn', ['--mutex', 'network', 'cache', 'clean', c],
92+
{stdio: [process.stdin, process.stdout, process.stderr]});
93+
}
9394
}
9495
}
9596

0 commit comments

Comments
 (0)