Skip to content

Commit f9a6c47

Browse files
cloutiertylerbfops
andcommitted
Update crates/cli/src/common_args.rs
Co-authored-by: Zeke Foppa <[email protected]> Signed-off-by: Tyler Cloutier <[email protected]>
1 parent 993cfe3 commit f9a6c47

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

crates/cli/src/common_args.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ pub fn clear_database() -> Arg {
5151
.short('c')
5252
.num_args(0..=1)
5353
.value_parser(value_parser!(ClearMode))
54+
// Because we have a default value for this flag, invocations can be ambiguous between
55+
//passing a value to this flag, vs using the default value and passing an anonymous arg
56+
// to the rest of the command. Adding `require_equals` resolves this ambiguity.
5457
.require_equals(true)
5558
.default_missing_value("always")
5659
.help(

0 commit comments

Comments
 (0)