File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -64,9 +64,19 @@ pub trait CommandExt: Sized {
64
64
all : & ' static str ,
65
65
exclude : & ' static str ,
66
66
) -> Self {
67
+ let unsupported_short_arg = {
68
+ let value_parser = UnknownArgumentValueParser :: suggest_arg ( "--exclude" ) ;
69
+ Arg :: new ( "unsupported-short-exclude-flag" )
70
+ . help ( "" )
71
+ . short ( 'x' )
72
+ . value_parser ( value_parser)
73
+ . action ( ArgAction :: SetTrue )
74
+ . hide ( true )
75
+ } ;
67
76
self . arg_package_spec_simple ( package)
68
77
. _arg ( flag ( "workspace" , all) . help_heading ( heading:: PACKAGE_SELECTION ) )
69
78
. _arg ( multi_opt ( "exclude" , "SPEC" , exclude) . help_heading ( heading:: PACKAGE_SELECTION ) )
79
+ . _arg ( unsupported_short_arg)
70
80
}
71
81
72
82
fn arg_package_spec_simple ( self , package : & ' static str ) -> Self {
Original file line number Diff line number Diff line change @@ -4354,6 +4354,8 @@ fn cargo_build_with_unsupported_short_exclude_flag() {
4354
4354
"\
4355
4355
error: unexpected argument '-x' found
4356
4356
4357
+ tip: a similar argument exists: '--exclude'
4358
+
4357
4359
Usage: cargo[EXE] build [OPTIONS]
4358
4360
4359
4361
For more information, try '--help'.
You can’t perform that action at this time.
0 commit comments