File tree 3 files changed +9
-6
lines changed
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 {
18
18
. about ( "Install a Rust binary. Default location is $HOME/.cargo/bin" )
19
19
. arg (
20
20
Arg :: new ( "crate" )
21
- . value_name ( "CRATE" )
21
+ . value_name ( "CRATE[@<VER>]" )
22
+ . help ( "Select the package from the given source" )
22
23
. value_parser ( parse_crate)
23
24
. num_args ( 0 ..) ,
24
25
)
Original file line number Diff line number Diff line change 1
1
Install a Rust binary. Default location is $HOME/.cargo/bin
2
2
3
- Usage: cargo install [OPTIONS] [CRATE]...
3
+ Usage: cargo install [OPTIONS] [CRATE[@<VER>] ]...
4
4
5
5
Arguments:
6
- [CRATE] ...
6
+ [CRATE[@<VER>]] ... Select the package from the given source
7
7
8
8
Options:
9
9
--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() {
1614
1614
cargo_process ( "install @0.1.1" )
1615
1615
. with_status ( 1 )
1616
1616
. 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 '@'
1618
1618
1619
1619
For more information, try '--help'.
1620
1620
" ,
@@ -1844,7 +1844,9 @@ fn install_empty_argument() {
1844
1844
cargo_process ( "install" )
1845
1845
. arg ( "" )
1846
1846
. 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
+ )
1848
1850
. run ( ) ;
1849
1851
}
1850
1852
@@ -2455,7 +2457,7 @@ error: unexpected argument '--release' found
2455
2457
2456
2458
tip: `--release` is the default for `cargo install`; instead `--debug` is supported
2457
2459
2458
- Usage: cargo[EXE] install [OPTIONS] [CRATE]...
2460
+ Usage: cargo[EXE] install [OPTIONS] [CRATE[@<VER>] ]...
2459
2461
2460
2462
For more information, try '--help'.
2461
2463
" ,
You can’t perform that action at this time.
0 commit comments