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
)

0 commit comments

Comments
 (0)