Skip to content

Commit

Permalink
generalise suggestion on abiguous spec
Browse files Browse the repository at this point in the history
Fixes #12433
  • Loading branch information
eopb committed Sep 18, 2023
1 parent 30ce446 commit 9831e83
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/cargo/core/package_id_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ impl PackageIdSpec {
your project, and the specification \
`{}` is ambiguous.\n\
Please re-run this command \
with `-p <spec>` where `<spec>` is one \
of the following:",
with one of the following \
specifications:",
self.name(),
self
);
Expand Down
4 changes: 2 additions & 2 deletions tests/testsuite/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1887,8 +1887,8 @@ fn update_ambiguous() {
"\
[ERROR] There are multiple `bar` packages in your project, and the specification `bar` \
is ambiguous.
Please re-run this command with `-p <spec>` where `<spec>` is one of the \
following:
Please re-run this command with one of the \
following specifications:
bar@0.[..].0
bar@0.[..].0
",
Expand Down
4 changes: 2 additions & 2 deletions tests/testsuite/pkgid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ fn multiple_versions() {
.with_stderr(
"\
error: There are multiple `two-ver` packages in your project, and the specification `two-ver@0` is ambiguous.
Please re-run this command with `-p <spec>` where `<spec>` is one of the following:
Please re-run this command with one of the following specifications:
two-ver@0.1.0
two-ver@0.2.0
",
Expand All @@ -174,7 +174,7 @@ https://github.com/rust-lang/crates.io-index#two-ver@0.2.0
.with_stderr(
"\
error: There are multiple `two-ver` packages in your project, and the specification `two-ver` is ambiguous.
Please re-run this command with `-p <spec>` where `<spec>` is one of the following:
Please re-run this command with one of the following specifications:
two-ver@0.1.0
two-ver@0.2.0
",
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1675,7 +1675,7 @@ fn ambiguous_name() {
.with_stderr_contains(
"\
error: There are multiple `dep` packages in your project, and the specification `dep` is ambiguous.
Please re-run this command with `-p <spec>` where `<spec>` is one of the following:
Please re-run this command with one of the following specifications:
dep@1.0.0
dep@2.0.0
",
Expand Down

0 comments on commit 9831e83

Please sign in to comment.