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/factory.rs | |
parent | cddefecfff38215cef509aa6c0a2119682b49c15 (diff) |
fix(ext/node): set correct process.argv0 (#22555)
Diffstat (limited to 'cli/factory.rs')
-rw-r--r-- | cli/factory.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/factory.rs b/cli/factory.rs index 9f3719510..22bc6cdaf 100644 --- a/cli/factory.rs +++ b/cli/factory.rs @@ -855,9 +855,10 @@ impl CliFactory { location: self.options.location_flag().clone(), // if the user ran a binary command, we'll need to set process.argv[0] // to be the name of the binary command instead of deno - maybe_binary_npm_command_name: self + argv0: self .options - .take_binary_npm_command_name(), + .take_binary_npm_command_name() + .or(std::env::args().next()), origin_data_folder_path: Some(self.deno_dir()?.origin_data_folder_path()), seed: self.options.seed(), unsafely_ignore_certificate_errors: self |