fix: ignore `EROFS` errors (#421)

This commit is contained in:
Antoine du Hamel 2024-03-08 10:39:08 +02:00 committed by GitHub
parent 3958d26462
commit b7ec137210
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -152,7 +152,7 @@ export class Engine {
throw new UsageError(`This package manager (${packageManager}) isn't supported by this corepack build`); throw new UsageError(`This package manager (${packageManager}) isn't supported by this corepack build`);
let lastKnownGoodFile = await getLastKnownGoodFile(`r+`).catch(err => { let lastKnownGoodFile = await getLastKnownGoodFile(`r+`).catch(err => {
if ((err as NodeError)?.code !== `ENOENT`) { if ((err as NodeError)?.code !== `ENOENT` && (err as NodeError)?.code !== `EROFS`) {
throw err; throw err;
} }
}); });