Skip to content

Commit 66a8488

Browse files
committed
Update error messages for tests
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
1 parent 3bbd5a5 commit 66a8488

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/cargo/ops/registry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ pub fn publish(ws: &Workspace<'_>, opts: &PublishOpts<'_>) -> CargoResult<()> {
137137
if allowed_registries.is_empty() {
138138
bail!(
139139
"`{}` cannot be published.\n\
140-
`publish` is set to `false` or an empty list in Cargo.toml and prevents publishing.",
140+
`package.publish` is set to `false` or an empty list in Cargo.toml and prevents publishing.",
141141
pkg.name(),
142142
);
143143
} else if !allowed_registries.contains(&reg_name) {

tests/testsuite/publish.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ fn unpublishable_crate() {
325325
.with_stderr(
326326
"\
327327
[ERROR] `foo` cannot be published.
328-
The registry `crates-io` is not listed in the `publish` value in Cargo.toml.
328+
`package.publish` is set to `false` or an empty list in Cargo.toml and prevents publishing.
329329
",
330330
)
331331
.run();
@@ -684,7 +684,7 @@ fn publish_empty_list() {
684684
.with_stderr(
685685
"\
686686
[ERROR] `foo` cannot be published.
687-
The registry `alternative` is not listed in the `publish` value in Cargo.toml.
687+
`package.publish` is set to `false` or an empty list in Cargo.toml and prevents publishing.
688688
",
689689
)
690690
.run();
@@ -848,7 +848,7 @@ fn block_publish_no_registry() {
848848
.with_stderr(
849849
"\
850850
[ERROR] `foo` cannot be published.
851-
The registry `alternative` is not listed in the `publish` value in Cargo.toml.
851+
`package.publish` is set to `false` or an empty list in Cargo.toml and prevents publishing.
852852
",
853853
)
854854
.run();

0 commit comments

Comments
 (0)