summaryrefslogtreecommitdiff
path: root/ext/node/polyfills
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/polyfills')
-rw-r--r--ext/node/polyfills/02_init.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/ext/node/polyfills/02_init.js b/ext/node/polyfills/02_init.js
index 71eebbc81..7a697abe4 100644
--- a/ext/node/polyfills/02_init.js
+++ b/ext/node/polyfills/02_init.js
@@ -10,14 +10,16 @@ import "node:module";
let initialized = false;
-function initialize(
- usesLocalNodeModulesDir,
- argv0,
- runningOnMainThread,
- workerId,
- maybeWorkerMetadata,
- warmup = false,
-) {
+function initialize(args) {
+ const {
+ usesLocalNodeModulesDir,
+ argv0,
+ runningOnMainThread,
+ workerId,
+ maybeWorkerMetadata,
+ nodeDebug,
+ warmup = false,
+ } = args;
if (!warmup) {
if (initialized) {
throw Error("Node runtime already initialized");
@@ -33,7 +35,7 @@ function initialize(
argv0,
Deno.args,
Deno.version,
- Deno.env.get("NODE_DEBUG") ?? "",
+ nodeDebug ?? "",
);
internals.__initWorkerThreads(
runningOnMainThread,