summaryrefslogtreecommitdiff
path: root/cli/args/flags.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/args/flags.rs')
-rw-r--r--cli/args/flags.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/args/flags.rs b/cli/args/flags.rs
index 773c95fec..c09d4e7e9 100644
--- a/cli/args/flags.rs
+++ b/cli/args/flags.rs
@@ -1111,7 +1111,6 @@ supported in canary.
)
.defer(|cmd| {
runtime_args(cmd, true, false)
- .arg(script_arg().required(true))
.arg(check_arg(true))
.arg(
Arg::new("include")
@@ -1152,6 +1151,7 @@ supported in canary.
.action(ArgAction::SetTrue),
)
.arg(executable_ext_arg())
+ .arg(script_arg().required(true).trailing_var_arg(true))
})
}
@@ -7262,14 +7262,14 @@ mod tests {
#[test]
fn compile_with_flags() {
#[rustfmt::skip]
- let r = flags_from_vec(svec!["deno", "compile", "--import-map", "import_map.json", "--no-remote", "--config", "tsconfig.json", "--no-check", "--unsafely-ignore-certificate-errors", "--reload", "--lock", "lock.json", "--lock-write", "--cert", "example.crt", "--cached-only", "--location", "https:foo", "--allow-read", "--allow-net", "--v8-flags=--help", "--seed", "1", "--no-terminal", "--output", "colors", "https://deno.land/std/examples/colors.ts", "foo", "bar"]);
+ let r = flags_from_vec(svec!["deno", "compile", "--import-map", "import_map.json", "--no-remote", "--config", "tsconfig.json", "--no-check", "--unsafely-ignore-certificate-errors", "--reload", "--lock", "lock.json", "--lock-write", "--cert", "example.crt", "--cached-only", "--location", "https:foo", "--allow-read", "--allow-net", "--v8-flags=--help", "--seed", "1", "--no-terminal", "--output", "colors", "https://deno.land/std/examples/colors.ts", "foo", "bar", "-p", "8080"]);
assert_eq!(
r.unwrap(),
Flags {
subcommand: DenoSubcommand::Compile(CompileFlags {
source_file: "https://deno.land/std/examples/colors.ts".to_string(),
output: Some(PathBuf::from("colors")),
- args: svec!["foo", "bar"],
+ args: svec!["foo", "bar", "-p", "8080"],
target: None,
no_terminal: true,
include: vec![]