Skip to content

Commit 898a2b3

Browse files
committed
chore: reflect to clap updates
1 parent 1cd6d38 commit 898a2b3

File tree

14 files changed

+37
-32
lines changed

14 files changed

+37
-32
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
error: The argument '--dev' cannot be used with '--build'
1+
error: the argument '--dev' cannot be used with '--build'
22

33
Usage: cargo add [OPTIONS] <DEP>[@<VERSION>] ...
44
cargo add [OPTIONS] --path <PATH> ...
55
cargo add [OPTIONS] --git <URL> ...
66

7-
For more information try '--help'
7+
For more information, try '--help'.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
error: Found argument '--flag' which wasn't expected, or isn't valid in this context
1+
error: unexpected argument '--flag'
22

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'
44

55
Usage: cargo add [OPTIONS] <DEP>[@<VERSION>] ...
66
cargo add [OPTIONS] --path <PATH> ...
77
cargo add [OPTIONS] --git <URL> ...
88

9-
For more information try '--help'
9+
For more information, try '--help'.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
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
22

3-
For more information try '--help'
3+
For more information, try '--help'.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: The following required arguments were not provided:
1+
error: the following required arguments were not provided:
22
<DEP_ID|--path <PATH>|--git <URI>>
33

44
Usage: cargo add [OPTIONS] <DEP>[@<VERSION>] ...
55
cargo add [OPTIONS] --path <PATH> ...
66
cargo add [OPTIONS] --git <URL> ...
77

8-
For more information try '--help'
8+
For more information, try '--help'.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
error: Found argument '--flag' which wasn't expected, or isn't valid in this context
1+
error: unexpected argument '--flag'
22

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'
44

55
Usage: cargo[EXE] remove <DEP_ID>...
66

7-
For more information try '--help'
7+
For more information, try '--help'.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
error: The following required arguments were not provided:
1+
error: the following required arguments were not provided:
22
<DEP_ID>...
33

44
Usage: cargo[EXE] remove <DEP_ID>...
55

6-
For more information try '--help'
6+
For more information, try '--help'.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
error: Found argument '--flag' which wasn't expected, or isn't valid in this context
1+
error: unexpected argument '--flag'
22

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'
44

55
Usage: cargo[EXE] init <path>
66

7-
For more information try '--help'
7+
For more information, try '--help'.

tests/testsuite/install.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,7 +1446,7 @@ fn not_both_vers_and_version() {
14461446
.with_status(1)
14471447
.with_stderr_contains(
14481448
"\
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
14501450
",
14511451
)
14521452
.run();
@@ -1649,7 +1649,7 @@ fn install_empty_argument() {
16491649
.arg("")
16501650
.with_status(1)
16511651
.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",
16531653
)
16541654
.run();
16551655
}

tests/testsuite/login.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,26 +133,28 @@ fn bad_asymmetric_token_args() {
133133
// These cases are kept brief as the implementation is covered by clap, so this is only smoke testing that we have clap configured correctly.
134134
cargo_process("login --key-subject=foo tok")
135135
.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]'",
137137
)
138138
.with_status(1)
139139
.run();
140140

141141
cargo_process("login --generate-keypair tok")
142142
.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]'",
144144
)
145145
.with_status(1)
146146
.run();
147147

148148
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+
)
150152
.with_status(1)
151153
.run();
152154

153155
cargo_process("login --generate-keypair --secret-key")
154156
.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'",
156158
)
157159
.with_status(1)
158160
.run();

tests/testsuite/metadata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1910,7 +1910,7 @@ fn cargo_metadata_bad_version() {
19101910
.with_status(1)
19111911
.with_stderr_contains(
19121912
"\
1913-
error: '2' isn't a valid value for '--format-version <VERSION>'
1913+
error: invalid value '2' for '--format-version <VERSION>'
19141914
[possible values: 1]
19151915
",
19161916
)

tests/testsuite/new.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ fn no_argument() {
106106
.with_status(1)
107107
.with_stderr_contains(
108108
"\
109-
error: The following required arguments were not provided:
109+
error: the following required arguments were not provided:
110110
<path>
111111
",
112112
)
@@ -322,7 +322,7 @@ fn unknown_flags() {
322322
cargo_process("new foo --flag")
323323
.with_status(1)
324324
.with_stderr_contains(
325-
"error: Found argument '--flag' which wasn't expected, or isn't valid in this context",
325+
"error: unexpected argument '--flag'",
326326
)
327327
.run();
328328
}
@@ -380,7 +380,7 @@ fn new_default_edition() {
380380
#[cargo_test]
381381
fn new_with_bad_edition() {
382382
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>'")
384384
.with_status(1)
385385
.run();
386386
}

tests/testsuite/run.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,10 @@ fn run_bins() {
589589
p.cargo("run --bins")
590590
.with_status(1)
591591
.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",
593596
)
594597
.run();
595598
}
@@ -1321,7 +1324,7 @@ fn run_multiple_packages() {
13211324
.arg("d2")
13221325
.with_status(1)
13231326
.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",
13251328
)
13261329
.run();
13271330

tests/testsuite/rustc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ fn fail_with_multiple_packages() {
551551
.with_status(1)
552552
.with_stderr_contains(
553553
"\
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
555555
",
556556
)
557557
.run();

tests/testsuite/vendor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,11 +436,11 @@ fn test_sync_argument() {
436436

437437
p.cargo("vendor --respect-source-config --manifest-path foo/Cargo.toml -s bar/Cargo.toml baz/Cargo.toml test_vendor")
438438
.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'
440440
441441
Usage: cargo[EXE] vendor [OPTIONS] [path]
442442
443-
For more information try '--help'",
443+
For more information, try '--help'.",
444444
)
445445
.with_status(1)
446446
.run();

0 commit comments

Comments
 (0)