summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorSatya Rohith <me@satyarohith.com>2024-02-23 22:00:29 +0530
committerGitHub <noreply@github.com>2024-02-23 17:30:29 +0100
commit47dee65e4ad20847108d2f7e590c001ca9b93204 (patch)
treec6c02343e50486ec4c7f7ddd5ee6ce2ad6249865 /runtime
parentcddefecfff38215cef509aa6c0a2119682b49c15 (diff)
fix(ext/node): set correct process.argv0 (#22555)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/js/99_main.js8
-rw-r--r--runtime/worker_bootstrap.rs8
2 files changed, 8 insertions, 8 deletions
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js
index 11c26798b..21c74aeff 100644
--- a/runtime/js/99_main.js
+++ b/runtime/js/99_main.js
@@ -644,7 +644,7 @@ function bootstrapMainRuntime(runtimeOptions) {
2: unstableFeatures,
3: inspectFlag,
5: hasNodeModulesDir,
- 6: maybeBinaryNpmCommandName,
+ 6: argv0,
7: shouldDisableDeprecatedApiWarning,
8: shouldUseVerboseDeprecatedApiWarning,
9: future,
@@ -768,7 +768,7 @@ function bootstrapMainRuntime(runtimeOptions) {
ObjectDefineProperty(globalThis, "Deno", core.propReadOnly(finalDenoNs));
if (nodeBootstrap) {
- nodeBootstrap(hasNodeModulesDir, maybeBinaryNpmCommandName);
+ nodeBootstrap(hasNodeModulesDir, argv0);
}
if (future) {
@@ -793,7 +793,7 @@ function bootstrapWorkerRuntime(
2: unstableFeatures,
4: enableTestingFeaturesFlag,
5: hasNodeModulesDir,
- 6: maybeBinaryNpmCommandName,
+ 6: argv0,
7: shouldDisableDeprecatedApiWarning,
8: shouldUseVerboseDeprecatedApiWarning,
} = runtimeOptions;
@@ -897,7 +897,7 @@ function bootstrapWorkerRuntime(
ObjectDefineProperty(globalThis, "Deno", core.propReadOnly(finalDenoNs));
if (nodeBootstrap) {
- nodeBootstrap(hasNodeModulesDir, maybeBinaryNpmCommandName);
+ nodeBootstrap(hasNodeModulesDir, argv0);
}
}
diff --git a/runtime/worker_bootstrap.rs b/runtime/worker_bootstrap.rs
index 300829630..c019dae1a 100644
--- a/runtime/worker_bootstrap.rs
+++ b/runtime/worker_bootstrap.rs
@@ -58,7 +58,7 @@ pub struct BootstrapOptions {
pub user_agent: String,
pub inspect: bool,
pub has_node_modules_dir: bool,
- pub maybe_binary_npm_command_name: Option<String>,
+ pub argv0: Option<String>,
pub node_ipc_fd: Option<i64>,
pub disable_deprecated_api_warning: bool,
pub verbose_deprecated_api_warning: bool,
@@ -89,7 +89,7 @@ impl Default for BootstrapOptions {
inspect: Default::default(),
args: Default::default(),
has_node_modules_dir: Default::default(),
- maybe_binary_npm_command_name: None,
+ argv0: None,
node_ipc_fd: None,
disable_deprecated_api_warning: false,
verbose_deprecated_api_warning: false,
@@ -121,7 +121,7 @@ struct BootstrapV8<'a>(
bool,
// has_node_modules_dir
bool,
- // maybe_binary_npm_command_name
+ // argv0
Option<&'a str>,
// disable_deprecated_api_warning,
bool,
@@ -147,7 +147,7 @@ impl BootstrapOptions {
self.inspect,
self.enable_testing_features,
self.has_node_modules_dir,
- self.maybe_binary_npm_command_name.as_deref(),
+ self.argv0.as_deref(),
self.disable_deprecated_api_warning,
self.verbose_deprecated_api_warning,
self.future,