Fix EACCES error code name
This commit is contained in:
parent
58d53527e0
commit
16c9c17cc2
2 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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}`);
|
||||
|
|
Loading…
Reference in a new issue