Skip to content

Commit 894dbbc

Browse files
authored
Suggest manifest for --features help
Suggested by ehuss
1 parent ca91c5d commit 894dbbc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/cargo/util/command_prelude.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ pub trait ArgMatchesExt {
309309
bail!(
310310
"--{} is not allowed in the root of a virtual workspace\n\
311311
note: while this was previously accepted, it didn't actually do anything\n\
312-
help: try cd into the package and run cargo command",
312+
help: change the current directory to the package directory, or use the --manifest-path flag to the path of the package",
313313
flag
314314
);
315315
}

tests/testsuite/package_features.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ fn virtual_no_default_features() {
5757
"\
5858
[ERROR] --no-default-features is not allowed in the root of a virtual workspace
5959
[NOTE] while this was previously accepted, it didn't actually do anything
60-
[HELP] try cd into the package and run cargo command
60+
[HELP] change the current directory to the package directory, or use the --manifest-path flag to the path of the package
6161
",
6262
)
6363
.run();
@@ -126,7 +126,7 @@ fn virtual_features() {
126126
"\
127127
[ERROR] --features is not allowed in the root of a virtual workspace
128128
[NOTE] while this was previously accepted, it didn't actually do anything
129-
[HELP] try cd into the package and run cargo command
129+
[HELP] change the current directory to the package directory, or use the --manifest-path flag to the path of the package
130130
",
131131
)
132132
.run();
@@ -204,7 +204,7 @@ fn virtual_with_specific() {
204204
"\
205205
[ERROR] --features is not allowed in the root of a virtual workspace
206206
[NOTE] while this was previously accepted, it didn't actually do anything
207-
[HELP] try cd into the package and run cargo command
207+
[HELP] change the current directory to the package directory, or use the --manifest-path flag to the path of the package
208208
",
209209
)
210210
.run();
@@ -374,7 +374,7 @@ fn virtual_member_slash() {
374374
"\
375375
[ERROR] --features is not allowed in the root of a virtual workspace
376376
[NOTE] while this was previously accepted, it didn't actually do anything
377-
[HELP] try cd into the package and run cargo command
377+
[HELP] change the current directory to the package directory, or use the --manifest-path flag to the path of the package
378378
",
379379
)
380380
.run();

0 commit comments

Comments
 (0)