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.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/cli/args/flags.rs b/cli/args/flags.rs
index a70b2c675..19dc5ce4b 100644
--- a/cli/args/flags.rs
+++ b/cli/args/flags.rs
@@ -754,6 +754,7 @@ fn check_subcommand<'a>() -> Command<'a> {
Arg::new("remote")
.long("remote")
.help("Type-check all modules, including remote")
+ .conflicts_with("no-remote")
)
.arg(
Arg::new("file")
@@ -3835,6 +3836,15 @@ mod tests {
..Flags::default()
}
);
+
+ let r = flags_from_vec(svec![
+ "deno",
+ "check",
+ "--remote",
+ "--no-remote",
+ "script.ts"
+ ]);
+ assert_eq!(r.unwrap_err().kind(), clap::ErrorKind::ArgumentConflict);
}
#[test]