diff --git a/cli/args/flags.rs b/cli/args/flags.rs index a70b2c6751..19dc5ce4b0 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]