diff options
author | Satya Rohith <me@satyarohith.com> | 2024-02-23 22:00:29 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-23 17:30:29 +0100 |
commit | 47dee65e4ad20847108d2f7e590c001ca9b93204 (patch) | |
tree | c6c02343e50486ec4c7f7ddd5ee6ce2ad6249865 /cli/standalone/mod.rs | |
parent | cddefecfff38215cef509aa6c0a2119682b49c15 (diff) |
fix(ext/node): set correct process.argv0 (#22555)
Diffstat (limited to 'cli/standalone/mod.rs')
-rw-r--r-- | cli/standalone/mod.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cli/standalone/mod.rs b/cli/standalone/mod.rs index d1b90ecee..312a1841d 100644 --- a/cli/standalone/mod.rs +++ b/cli/standalone/mod.rs @@ -536,11 +536,10 @@ pub async fn run( is_npm_main: main_module.scheme() == "npm", skip_op_registration: true, location: metadata.location, - maybe_binary_npm_command_name: NpmPackageReqReference::from_specifier( - main_module, - ) - .ok() - .map(|req_ref| npm_pkg_req_ref_to_binary_command(&req_ref)), + argv0: NpmPackageReqReference::from_specifier(main_module) + .ok() + .map(|req_ref| npm_pkg_req_ref_to_binary_command(&req_ref)) + .or(std::env::args().next()), origin_data_folder_path: None, seed: metadata.seed, unsafely_ignore_certificate_errors: metadata |