From b2628e4a069ed9fc13f34f6e4fd75f29c657e5a9 Mon Sep 17 00:00:00 2001 From: Satya Rohith Date: Sun, 5 May 2024 19:46:02 +0530 Subject: fix(ext/node): don't rely on Deno.env to read NODE_DEBUG (#23694) This patch allows implementors to use ext/node without the need to implement Deno.env API. Closes https://github.com/denoland/deno/issues/23687 --- runtime/worker_bootstrap.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'runtime/worker_bootstrap.rs') diff --git a/runtime/worker_bootstrap.rs b/runtime/worker_bootstrap.rs index ee3b81c62..31cb883db 100644 --- a/runtime/worker_bootstrap.rs +++ b/runtime/worker_bootstrap.rs @@ -85,6 +85,7 @@ pub struct BootstrapOptions { pub inspect: bool, pub has_node_modules_dir: bool, pub argv0: Option, + pub node_debug: Option, pub node_ipc_fd: Option, pub disable_deprecated_api_warning: bool, pub verbose_deprecated_api_warning: bool, @@ -120,6 +121,7 @@ impl Default for BootstrapOptions { args: Default::default(), has_node_modules_dir: Default::default(), argv0: None, + node_debug: None, node_ipc_fd: None, disable_deprecated_api_warning: false, verbose_deprecated_api_warning: false, @@ -156,6 +158,8 @@ struct BootstrapV8<'a>( bool, // argv0 Option<&'a str>, + // node_debug + Option<&'a str>, // disable_deprecated_api_warning, bool, // verbose_deprecated_api_warning @@ -187,6 +191,7 @@ impl BootstrapOptions { self.enable_testing_features, self.has_node_modules_dir, self.argv0.as_deref(), + self.node_debug.as_deref(), self.disable_deprecated_api_warning, self.verbose_deprecated_api_warning, self.future, -- cgit v1.2.3