File tree Expand file tree Collapse file tree 14 files changed +37
-32
lines changed Expand file tree Collapse file tree 14 files changed +37
-32
lines changed Original file line number Diff line number Diff line change 1
- error: The argument '--dev' cannot be used with '--build'
1
+ error: the argument '--dev' cannot be used with '--build'
2
2
3
3
Usage: cargo add [OPTIONS] <DEP>[@<VERSION>] ...
4
4
cargo add [OPTIONS] --path <PATH> ...
5
5
cargo add [OPTIONS] --git <URL> ...
6
6
7
- For more information try '--help'
7
+ For more information, try '--help'.
Original file line number Diff line number Diff line change 1
- error: Found argument '--flag' which wasn't expected, or isn't valid in this context
1
+ error: unexpected argument '--flag'
2
2
3
- If you tried to supply '--flag' as a value rather than a flag , use '-- --flag'
3
+ note: to pass '--flag' as a value, use '-- --flag'
4
4
5
5
Usage: cargo add [OPTIONS] <DEP>[@<VERSION>] ...
6
6
cargo add [OPTIONS] --path <PATH> ...
7
7
cargo add [OPTIONS] --git <URL> ...
8
8
9
- For more information try '--help'
9
+ For more information, try '--help'.
Original file line number Diff line number Diff line change 1
- error: The argument '--target <TARGET>' requires a value but none was supplied
1
+ error: a value is required for '--target <TARGET>' but none was supplied
2
2
3
- For more information try '--help'
3
+ For more information, try '--help'.
Original file line number Diff line number Diff line change 1
- error: The following required arguments were not provided:
1
+ error: the following required arguments were not provided:
2
2
<DEP_ID|--path <PATH>|--git <URI>>
3
3
4
4
Usage: cargo add [OPTIONS] <DEP>[@<VERSION>] ...
5
5
cargo add [OPTIONS] --path <PATH> ...
6
6
cargo add [OPTIONS] --git <URL> ...
7
7
8
- For more information try '--help'
8
+ For more information, try '--help'.
Original file line number Diff line number Diff line change 1
- error: Found argument '--flag' which wasn't expected, or isn't valid in this context
1
+ error: unexpected argument '--flag'
2
2
3
- If you tried to supply '--flag' as a value rather than a flag , use '-- --flag'
3
+ note: to pass '--flag' as a value, use '-- --flag'
4
4
5
5
Usage: cargo[EXE] remove <DEP_ID>...
6
6
7
- For more information try '--help'
7
+ For more information, try '--help'.
Original file line number Diff line number Diff line change 1
- error: The following required arguments were not provided:
1
+ error: the following required arguments were not provided:
2
2
<DEP_ID>...
3
3
4
4
Usage: cargo[EXE] remove <DEP_ID>...
5
5
6
- For more information try '--help'
6
+ For more information, try '--help'.
Original file line number Diff line number Diff line change 1
- error: Found argument '--flag' which wasn't expected, or isn't valid in this context
1
+ error: unexpected argument '--flag'
2
2
3
- If you tried to supply '--flag' as a value rather than a flag , use '-- --flag'
3
+ note: to pass '--flag' as a value, use '-- --flag'
4
4
5
5
Usage: cargo[EXE] init <path>
6
6
7
- For more information try '--help'
7
+ For more information, try '--help'.
Original file line number Diff line number Diff line change @@ -1446,7 +1446,7 @@ fn not_both_vers_and_version() {
1446
1446
. with_status ( 1 )
1447
1447
. with_stderr_contains (
1448
1448
"\
1449
- error: The argument '--version <VERSION>' was provided more than once, but cannot be used multiple times
1449
+ [ERROR] the argument '--version <VERSION>' cannot be used multiple times
1450
1450
" ,
1451
1451
)
1452
1452
. run ( ) ;
@@ -1649,7 +1649,7 @@ fn install_empty_argument() {
1649
1649
. arg ( "" )
1650
1650
. with_status ( 1 )
1651
1651
. with_stderr_contains (
1652
- "[ERROR] The argument '[crate]...' requires a value but none was supplied" ,
1652
+ "[ERROR] a value is required for '[crate]...' but none was supplied" ,
1653
1653
)
1654
1654
. run ( ) ;
1655
1655
}
Original file line number Diff line number Diff line change @@ -133,26 +133,28 @@ fn bad_asymmetric_token_args() {
133
133
// These cases are kept brief as the implementation is covered by clap, so this is only smoke testing that we have clap configured correctly.
134
134
cargo_process ( "login --key-subject=foo tok" )
135
135
. with_stderr_contains (
136
- "[ERROR] The argument '--key-subject <SUBJECT>' cannot be used with '[token]'" ,
136
+ "error: the argument '--key-subject <SUBJECT>' cannot be used with '[token]'" ,
137
137
)
138
138
. with_status ( 1 )
139
139
. run ( ) ;
140
140
141
141
cargo_process ( "login --generate-keypair tok" )
142
142
. with_stderr_contains (
143
- "[ERROR] The argument '--generate-keypair' cannot be used with '[token]'" ,
143
+ "error: the argument '--generate-keypair' cannot be used with '[token]'" ,
144
144
)
145
145
. with_status ( 1 )
146
146
. run ( ) ;
147
147
148
148
cargo_process ( "login --secret-key tok" )
149
- . with_stderr_contains ( "[ERROR] The argument '--secret-key' cannot be used with '[token]'" )
149
+ . with_stderr_contains (
150
+ "error: the argument '--secret-key' cannot be used with '[token]'"
151
+ )
150
152
. with_status ( 1 )
151
153
. run ( ) ;
152
154
153
155
cargo_process ( "login --generate-keypair --secret-key" )
154
156
. with_stderr_contains (
155
- "[ERROR] The argument '--generate-keypair' cannot be used with '--secret-key'" ,
157
+ "error: the argument '--generate-keypair' cannot be used with '--secret-key'" ,
156
158
)
157
159
. with_status ( 1 )
158
160
. run ( ) ;
Original file line number Diff line number Diff line change @@ -1910,7 +1910,7 @@ fn cargo_metadata_bad_version() {
1910
1910
. with_status ( 1 )
1911
1911
. with_stderr_contains (
1912
1912
"\
1913
- error: '2' isn't a valid value for '--format-version <VERSION>'
1913
+ error: invalid value '2' for '--format-version <VERSION>'
1914
1914
[possible values: 1]
1915
1915
" ,
1916
1916
)
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ fn no_argument() {
106
106
. with_status ( 1 )
107
107
. with_stderr_contains (
108
108
"\
109
- error: The following required arguments were not provided:
109
+ error: the following required arguments were not provided:
110
110
<path>
111
111
" ,
112
112
)
@@ -322,7 +322,7 @@ fn unknown_flags() {
322
322
cargo_process ( "new foo --flag" )
323
323
. with_status ( 1 )
324
324
. with_stderr_contains (
325
- "error: Found argument '--flag' which wasn't expected, or isn't valid in this context " ,
325
+ "error: unexpected argument '--flag'" ,
326
326
)
327
327
. run ( ) ;
328
328
}
@@ -380,7 +380,7 @@ fn new_default_edition() {
380
380
#[ cargo_test]
381
381
fn new_with_bad_edition ( ) {
382
382
cargo_process ( "new --edition something_else foo" )
383
- . with_stderr_contains ( "error: 'something_else' isn't a valid value[..] " )
383
+ . with_stderr_contains ( "error: invalid value 'something_else' for '--edition <YEAR>' " )
384
384
. with_status ( 1 )
385
385
. run ( ) ;
386
386
}
Original file line number Diff line number Diff line change @@ -589,7 +589,10 @@ fn run_bins() {
589
589
p. cargo ( "run --bins" )
590
590
. with_status ( 1 )
591
591
. with_stderr_contains (
592
- "error: Found argument '--bins' which wasn't expected, or isn't valid in this context" ,
592
+ "\
593
+ error: unexpected argument '--bins'
594
+
595
+ note: argument '--bin' exists" ,
593
596
)
594
597
. run ( ) ;
595
598
}
@@ -1321,7 +1324,7 @@ fn run_multiple_packages() {
1321
1324
. arg ( "d2" )
1322
1325
. with_status ( 1 )
1323
1326
. with_stderr_contains (
1324
- "error: The argument '--package [<SPEC>]' was provided more than once, but cannot be used multiple times" ,
1327
+ "error: the argument '--package [<SPEC>]' cannot be used multiple times" ,
1325
1328
)
1326
1329
. run ( ) ;
1327
1330
Original file line number Diff line number Diff line change @@ -551,7 +551,7 @@ fn fail_with_multiple_packages() {
551
551
. with_status ( 1 )
552
552
. with_stderr_contains (
553
553
"\
554
- error: The argument '--package [<SPEC>]' was provided more than once, but cannot be used multiple times
554
+ error: the argument '--package [<SPEC>]' cannot be used multiple times
555
555
" ,
556
556
)
557
557
. run ( ) ;
Original file line number Diff line number Diff line change @@ -436,11 +436,11 @@ fn test_sync_argument() {
436
436
437
437
p. cargo ( "vendor --respect-source-config --manifest-path foo/Cargo.toml -s bar/Cargo.toml baz/Cargo.toml test_vendor" )
438
438
. with_stderr ( "\
439
- error: Found argument 'test_vendor' which wasn't expected, or isn't valid in this context
439
+ error: unexpected argument 'test_vendor'
440
440
441
441
Usage: cargo[EXE] vendor [OPTIONS] [path]
442
442
443
- For more information try '--help'" ,
443
+ For more information, try '--help'. " ,
444
444
)
445
445
. with_status ( 1 )
446
446
. run ( ) ;
You can’t perform that action at this time.
0 commit comments