mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
fix(check): --remote and --no-remote should be mutually exclusive (#14964)
This commit is contained in:
parent
b8933b1b56
commit
cbd8307710
1 changed files with 10 additions and 0 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue