summaryrefslogtreecommitdiff
path: root/cli/mainrt.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/mainrt.rs')
-rw-r--r--cli/mainrt.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/cli/mainrt.rs b/cli/mainrt.rs
index 56bde7c4b..59efa026c 100644
--- a/cli/mainrt.rs
+++ b/cli/mainrt.rs
@@ -30,6 +30,7 @@ use deno_runtime::tokio_util::create_and_run_current_thread_with_maybe_metrics;
pub use deno_runtime::UNSTABLE_GRANULAR_FLAGS;
use deno_terminal::colors;
+use std::borrow::Cow;
use std::env;
use std::env::current_exe;
@@ -70,12 +71,14 @@ fn unwrap_or_exit<T>(result: Result<T, AnyError>) -> T {
fn main() {
let args: Vec<_> = env::args_os().collect();
let current_exe_path = current_exe().unwrap();
- let standalone = standalone::extract_standalone(&current_exe_path, args);
+ let standalone =
+ standalone::extract_standalone(&current_exe_path, Cow::Owned(args));
let future = async move {
match standalone {
Ok(Some(future)) => {
let (metadata, eszip) = future.await?;
- standalone::run(eszip, metadata).await
+ let exit_code = standalone::run(eszip, metadata).await?;
+ std::process::exit(exit_code);
}
Ok(None) => Ok(()),
Err(err) => Err(err),