mirror of
https://github.com/denoland/deno.git
synced 2025-01-18 03:44:05 -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")
|
Arg::new("remote")
|
||||||
.long("remote")
|
.long("remote")
|
||||||
.help("Type-check all modules, including remote")
|
.help("Type-check all modules, including remote")
|
||||||
|
.conflicts_with("no-remote")
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new("file")
|
Arg::new("file")
|
||||||
|
@ -3835,6 +3836,15 @@ mod tests {
|
||||||
..Flags::default()
|
..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]
|
#[test]
|
||||||
|
|
Loading…
Add table
Reference in a new issue