mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 20:29:11 +00:00
chore(cli): remove extract_standalone path from CLI (#23982)
No longer needed as standalone binaries use `denort`
This commit is contained in:
parent
b21004b1d1
commit
16ed81f62c
2 changed files with 10 additions and 24 deletions
29
cli/main.rs
29
cli/main.rs
|
@ -49,9 +49,7 @@ use deno_runtime::fmt_errors::format_js_error;
|
||||||
use deno_runtime::tokio_util::create_and_run_current_thread_with_maybe_metrics;
|
use deno_runtime::tokio_util::create_and_run_current_thread_with_maybe_metrics;
|
||||||
use deno_terminal::colors;
|
use deno_terminal::colors;
|
||||||
use factory::CliFactory;
|
use factory::CliFactory;
|
||||||
use std::borrow::Cow;
|
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::env::current_exe;
|
|
||||||
use std::future::Future;
|
use std::future::Future;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
|
@ -331,29 +329,12 @@ pub fn main() {
|
||||||
);
|
);
|
||||||
|
|
||||||
let args: Vec<_> = env::args_os().collect();
|
let args: Vec<_> = env::args_os().collect();
|
||||||
let current_exe_path = current_exe().unwrap();
|
|
||||||
let maybe_standalone = match standalone::extract_standalone(
|
|
||||||
¤t_exe_path,
|
|
||||||
Cow::Borrowed(&args),
|
|
||||||
) {
|
|
||||||
Ok(standalone) => standalone,
|
|
||||||
Err(err) => exit_for_error(err),
|
|
||||||
};
|
|
||||||
|
|
||||||
let future = async move {
|
let future = async move {
|
||||||
match maybe_standalone {
|
// NOTE(lucacasonato): due to new PKU feature introduced in V8 11.6 we need to
|
||||||
Some(future) => {
|
// initialize the V8 platform on a parent thread of all threads that will spawn
|
||||||
let (metadata, eszip) = future.await?;
|
// V8 isolates.
|
||||||
standalone::run(eszip, metadata).await
|
let flags = resolve_flags_and_init(args)?;
|
||||||
}
|
run_subcommand(flags).await
|
||||||
None => {
|
|
||||||
// NOTE(lucacasonato): due to new PKU feature introduced in V8 11.6 we need to
|
|
||||||
// initialize the V8 platform on a parent thread of all threads that will spawn
|
|
||||||
// V8 isolates.
|
|
||||||
let flags = resolve_flags_and_init(args)?;
|
|
||||||
run_subcommand(flags).await
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
match create_and_run_current_thread_with_maybe_metrics(future) {
|
match create_and_run_current_thread_with_maybe_metrics(future) {
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
|
|
||||||
|
// Allow unused code warnings because we share
|
||||||
|
// code between the two bin targets.
|
||||||
|
#![allow(dead_code)]
|
||||||
|
#![allow(unused_imports)]
|
||||||
|
|
||||||
use crate::args::create_default_npmrc;
|
use crate::args::create_default_npmrc;
|
||||||
use crate::args::get_root_cert_store;
|
use crate::args::get_root_cert_store;
|
||||||
use crate::args::npm_pkg_req_ref_to_binary_command;
|
use crate::args::npm_pkg_req_ref_to_binary_command;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue