refactor(cli): extract out ProcState from CliMainWorker (#18867)

This commit is contained in:
David Sherret 2023-04-27 10:05:20 -04:00 committed by GitHub
parent 03132e19da
commit 742cc3111c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 660 additions and 421 deletions

View file

@ -534,10 +534,10 @@ deno_core::extension!(deno_node,
pub fn initialize_runtime(
js_runtime: &mut JsRuntime,
uses_local_node_modules_dir: bool,
maybe_binary_command_name: Option<String>,
maybe_binary_command_name: Option<&str>,
) -> Result<(), AnyError> {
let argv0 = if let Some(binary_command_name) = maybe_binary_command_name {
serde_json::to_string(binary_command_name.as_str())?
serde_json::to_string(binary_command_name)?
} else {
"undefined".to_string()
};