Skip to content

Commit c51c6bb

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

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();

0 commit comments

Comments
 (0)