From 00e6d41a9d86c3c1a2e8807461bab127e52f0a10 Mon Sep 17 00:00:00 2001 From: Marvin Hagemeister Date: Thu, 16 May 2024 10:30:41 +0200 Subject: [PATCH] fix(node): error when throwing `FS_EISDIR` (#23829) The `EISDIR` error code is not available as a global variable, but must be accessed through the `osConstants.errno` object. Fixes https://github.com/denoland/deno/issues/23695 --- ext/node/polyfills/internal/fs/utils.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/node/polyfills/internal/fs/utils.mjs b/ext/node/polyfills/internal/fs/utils.mjs index 09169127d2..a1823bb328 100644 --- a/ext/node/polyfills/internal/fs/utils.mjs +++ b/ext/node/polyfills/internal/fs/utils.mjs @@ -891,7 +891,7 @@ export const validateRmOptionsSync = hideStackFrames( message: "is a directory", path, syscall: "rm", - errno: EISDIR, + errno: osConstants.errno.EISDIR, }); } }