Skip to content

Commit 5f7b1c1

Browse files
committed
fix: remove unsafe remove of install folder
1 parent b9eea58 commit 5f7b1c1

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

sources/corepackUtils.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,6 @@ export async function installVersion(installTarget: string, locator: Locator, {s
172172
hash: serializedHash,
173173
}));
174174

175-
// The target folder may exist if a previous version of Corepack installed
176-
// it but didn't create the `.corepack` file. In this case we need to
177-
// remove it first.
178-
await fs.promises.rm(installFolder, {
179-
recursive: true,
180-
force: true,
181-
});
182-
183175
await fs.promises.mkdir(path.dirname(installFolder), {recursive: true});
184176
try {
185177
await fs.promises.rename(tmpFolder, installFolder);

0 commit comments

Comments
 (0)