diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-03-31 10:58:19 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-31 10:58:19 -0400 |
commit | eb6f6ff33d5b1e5c4ac799936cd1a80aa6213bdf (patch) | |
tree | a6306b68228a81aec43024b183678675d9ca265b /cli/standalone/binary.rs | |
parent | 05598af36edddd94b2349217da0e7c9ec65c06b1 (diff) |
refactor: cleanup main entrypoint (#23145)
Diffstat (limited to 'cli/standalone/binary.rs')
-rw-r--r-- | cli/standalone/binary.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/standalone/binary.rs b/cli/standalone/binary.rs index a3a12f5e2..2fc0c30c2 100644 --- a/cli/standalone/binary.rs +++ b/cli/standalone/binary.rs @@ -1,5 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. +use std::borrow::Cow; use std::collections::BTreeMap; use std::env::current_exe; use std::ffi::OsString; @@ -240,7 +241,7 @@ pub fn is_standalone_binary(exe_path: &Path) -> bool { /// the bundle is executed. If not, this function exits with `Ok(None)`. pub fn extract_standalone( exe_path: &Path, - cli_args: Vec<OsString>, + cli_args: Cow<Vec<OsString>>, ) -> Result< Option<impl Future<Output = Result<(Metadata, eszip::EszipV2), AnyError>>>, AnyError, @@ -257,6 +258,7 @@ pub fn extract_standalone( file.seek(SeekFrom::Start(trailer.eszip_pos))?; + let cli_args = cli_args.into_owned(); // If we have an eszip, read it out Ok(Some(async move { let bufreader = |