Skip to content

Commit 98645f1

Browse files
committed
Auto merge of #11578 - weihanglo:ci-fix, r=epage
ci: reflect to clap updates
2 parents 1cd6d38 + c51c6bb commit 98645f1

File tree

15 files changed

+36
-37
lines changed

15 files changed

+36
-37
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ toml_edit = { version = "0.15.0", features = ["serde", "easy", "perf"] }
6868
unicode-xid = "0.2.0"
6969
url = "2.2.2"
7070
walkdir = "2.2"
71-
clap = "4.0.15"
71+
clap = "4.1.1"
7272
unicode-width = "0.1.5"
7373
openssl = { version = '0.10.11', optional = true }
7474
im-rc = "15.0.0"
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' found
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' found
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' found
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 & 4 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();
@@ -1648,9 +1648,7 @@ fn install_empty_argument() {
16481648
cargo_process("install")
16491649
.arg("")
16501650
.with_status(1)
1651-
.with_stderr_contains(
1652-
"[ERROR] The argument '[crate]...' requires a value but none was supplied",
1653-
)
1651+
.with_stderr_contains("[ERROR] a value is required for '[crate]...' but none was supplied")
16541652
.run();
16551653
}
16561654

tests/testsuite/login.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,26 +133,26 @@ 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("error: the argument '--secret-key' cannot be used with '[token]'")
150150
.with_status(1)
151151
.run();
152152

153153
cargo_process("login --generate-keypair --secret-key")
154154
.with_stderr_contains(
155-
"[ERROR] The argument '--generate-keypair' cannot be used with '--secret-key'",
155+
"error: the argument '--generate-keypair' cannot be used with '--secret-key'",
156156
)
157157
.with_status(1)
158158
.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 & 5 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
)
@@ -321,9 +321,7 @@ fn subpackage_git_with_vcs_arg() {
321321
fn unknown_flags() {
322322
cargo_process("new foo --flag")
323323
.with_status(1)
324-
.with_stderr_contains(
325-
"error: Found argument '--flag' which wasn't expected, or isn't valid in this context",
326-
)
324+
.with_stderr_contains("error: unexpected argument '--flag' found")
327325
.run();
328326
}
329327

@@ -380,7 +378,7 @@ fn new_default_edition() {
380378
#[cargo_test]
381379
fn new_with_bad_edition() {
382380
cargo_process("new --edition something_else foo")
383-
.with_stderr_contains("error: 'something_else' isn't a valid value[..]")
381+
.with_stderr_contains("error: invalid value 'something_else' for '--edition <YEAR>'")
384382
.with_status(1)
385383
.run();
386384
}

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' found
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' found
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)