File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ pub fn cli() -> Command {
1818 . about ( "Install a Rust binary. Default location is $HOME/.cargo/bin" )
1919 . arg (
2020 Arg :: new ( "crate" )
21- . value_name ( "CRATE" )
21+ . value_name ( "CRATE[@<VER>]" )
22+ . help ( "Select the package from the given source" )
2223 . value_parser ( parse_crate)
2324 . num_args ( 0 ..) ,
2425 )
Original file line number Diff line number Diff line change 11Install a Rust binary. Default location is $HOME/.cargo/bin
22
3- Usage: cargo[EXE] install [OPTIONS] [CRATE]...
3+ Usage: cargo[EXE] install [OPTIONS] [CRATE[@<VER>] ]...
44
55Arguments:
6- [CRATE] ...
6+ [CRATE[@<VER>]] ... Select the package from the given source
77
88Options:
99 --version <VERSION> Specify a version to install
Original file line number Diff line number Diff line change @@ -1614,7 +1614,7 @@ fn inline_version_without_name() {
16141614 cargo_process ( "install @0.1.1" )
16151615 . with_status ( 1 )
16161616 . with_stderr (
1617- "error: invalid value '@0.1.1' for '[CRATE]...': missing crate name before '@'
1617+ "error: invalid value '@0.1.1' for '[CRATE[@<VER>] ]...': missing crate name before '@'
16181618
16191619For more information, try '--help'.
16201620" ,
@@ -1844,7 +1844,9 @@ fn install_empty_argument() {
18441844 cargo_process ( "install" )
18451845 . arg ( "" )
18461846 . with_status ( 1 )
1847- . with_stderr_contains ( "[ERROR] invalid value '' for '[CRATE]...': crate name is empty" )
1847+ . with_stderr_contains (
1848+ "[ERROR] invalid value '' for '[CRATE[@<VER>]]...': crate name is empty" ,
1849+ )
18481850 . run ( ) ;
18491851}
18501852
@@ -2455,7 +2457,7 @@ error: unexpected argument '--release' found
24552457
24562458 tip: `--release` is the default for `cargo install`; instead `--debug` is supported
24572459
2458- Usage: cargo[EXE] install [OPTIONS] [CRATE]...
2460+ Usage: cargo[EXE] install [OPTIONS] [CRATE[@<VER>] ]...
24592461
24602462For more information, try '--help'.
24612463" ,
You can’t perform that action at this time.
0 commit comments