-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkgid cmd: fix help msg with multiple packages #3149
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
@@ -139,8 +139,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 is one of the following as \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be missing the "``-p where
`" part?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or, rather, the -p
part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the point.
$ cargo pkgid uuid 101 ↵
error: There are multiple `uuid` packages in your project, and the specification `uuid` is ambiguous.
Please re-run this command with `-p <spec>` where `<spec>` is one of the following:
uuid:0.3.1
uuid:0.2.3
$ cargo pkgid -p uuid:0.3.1 101 ↵
error: Unknown flag: '-p'
Usage:
cargo pkgid [options] [<spec>]
$ cargo pkgid uuid:0.3.1 1 ↵
https://github.com/rust-lang/crates.io-index#uuid:0.3.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Further more from Cargo 0.13.0
$ cargo pkgid --help
Print a fully qualified package specification
Usage:
cargo pkgid [options] [<spec>]
Options:
-h, --help Print this message
--manifest-path PATH Path to the manifest to the package to clean
-v, --verbose ... Use verbose output
-q, --quiet No output printed to stdout
--color WHEN Coloring: auto, always, never
--frozen Require Cargo.lock and cache are up to date
--locked Require Cargo.lock is up to date
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see now. I didn't connect that the -p
doesn't work. No idea how I missed that in the description, sorry.
Thanks for the report! Perhaps though the |
Yeah we can do that. |
When you use this command and there are multiple packages that match this spec, the help instructions tell you to rerun it with the -p argument which was previously not present. Since the code paths are shared with 'cargo build' and 'cargo update', this adds the -p argument to 'cargo pkgid' to make things more consistent. Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
@alexcrichton This should be good for another peek. I aimed to retain backwards compatibility for people that might have scripts that don't use the |
@bors: r+ Thanks! |
📌 Commit 1e7893c has been approved by |
pkgid cmd: fix help msg with multiple packages When there are multiple versions of a package that match a given spec the command tells you to re-run it with the `-p` argument which does not exist. The command appears to work without it properly. Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
☀️ Test successful - cargo-cross-linux, cargo-linux-32, cargo-linux-64, cargo-mac-32, cargo-mac-64, cargo-win-gnu-32, cargo-win-gnu-64, cargo-win-msvc-32, cargo-win-msvc-64 |
When there are multiple versions of a package that match a given spec
the command tells you to re-run it with the
-p
argument which does notexist. The command appears to work without it properly.
Signed-off-by: Doug Goldstein cardoe@cardoe.com