summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/02_init.js
diff options
context:
space:
mode:
authorSatya Rohith <me@satyarohith.com>2024-04-29 15:06:53 +0530
committerGitHub <noreply@github.com>2024-04-29 09:36:53 +0000
commitb8444066ea83433c8a3597407a9fb6b9e9e36085 (patch)
treec1a7686c5f776447c138e7943678060eb722626b /ext/node/polyfills/02_init.js
parent455cf1743f70cb12025e36b3c4eb9a213fe77199 (diff)
fix(ext/node): support NODE_DEBUG env (#23583)
Diffstat (limited to 'ext/node/polyfills/02_init.js')
-rw-r--r--ext/node/polyfills/02_init.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/ext/node/polyfills/02_init.js b/ext/node/polyfills/02_init.js
index 752f518bf..71eebbc81 100644
--- a/ext/node/polyfills/02_init.js
+++ b/ext/node/polyfills/02_init.js
@@ -29,7 +29,12 @@ function initialize(
// FIXME(bartlomieju): not nice to depend on `Deno` namespace here
// but it's the only way to get `args` and `version` and this point.
- internals.__bootstrapNodeProcess(argv0, Deno.args, Deno.version);
+ internals.__bootstrapNodeProcess(
+ argv0,
+ Deno.args,
+ Deno.version,
+ Deno.env.get("NODE_DEBUG") ?? "",
+ );
internals.__initWorkerThreads(
runningOnMainThread,
workerId,
@@ -40,7 +45,13 @@ function initialize(
delete internals.requireImpl;
} else {
// Warm up the process module
- internals.__bootstrapNodeProcess(undefined, undefined, undefined, true);
+ internals.__bootstrapNodeProcess(
+ undefined,
+ undefined,
+ undefined,
+ undefined,
+ true,
+ );
}
}