From 16c9c17cc23eb17a91bbfc7c07ab917b4df533ca Mon Sep 17 00:00:00 2001 From: David Sanders Date: Sun, 11 Dec 2022 20:09:30 -0800 Subject: [PATCH] Fix EACCES error code name --- ts/updater/util.ts | 2 +- ts/util/rotatingPinoDest.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/updater/util.ts b/ts/updater/util.ts index 5bff132ea9..f165b7a078 100644 --- a/ts/updater/util.ts +++ b/ts/updater/util.ts @@ -75,7 +75,7 @@ async function doGracefulRename({ ); } } catch (error) { - if (error.code !== 'EACCESS' && error.code !== 'EPERM') { + if (error.code !== 'EACCES' && error.code !== 'EPERM') { throw error; } diff --git a/ts/util/rotatingPinoDest.ts b/ts/util/rotatingPinoDest.ts index a97be7d9ca..02f74ec928 100644 --- a/ts/util/rotatingPinoDest.ts +++ b/ts/util/rotatingPinoDest.ts @@ -69,7 +69,7 @@ export function createRotatingPinoDest({ // delay. if ( retryCount < MAX_RETRY_COUNT && - (error.code === 'EACCESS' || error.code === 'EPERM') + (error.code === 'EACCES' || error.code === 'EPERM') ) { retryCount += 1; warn(`rotatingPinoDest: retrying rotation, retryCount=${retryCount}`);