Skip to content

Commit 48cffc6

Browse files
committed
fix(cargo-install): clarify --path is installation source
1 parent 14ef091 commit 48cffc6

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

src/bin/cargo/commands/install.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ pub fn cli() -> Command {
6363
.requires("git"),
6464
)
6565
.arg(
66-
opt("path", "Filesystem path to local crate to install")
66+
opt("path", "Filesystem path to local crate to install from")
6767
.value_name("PATH")
6868
.conflicts_with_all(&["git", "index", "registry"]),
6969
)

src/cargo/ops/cargo_install.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,14 +210,14 @@ impl<'cfg> InstallablePackage<'cfg> {
210210
if from_cwd {
211211
if pkg.manifest().edition() == Edition::Edition2015 {
212212
config.shell().warn(
213-
"Using `cargo install` to install the binaries for the \
213+
"Using `cargo install` to install the binaries from the \
214214
package in current working directory is deprecated, \
215215
use `cargo install --path .` instead. \
216216
Use `cargo build` if you want to simply build the package.",
217217
)?
218218
} else {
219219
bail!(
220-
"Using `cargo install` to install the binaries for the \
220+
"Using `cargo install` to install the binaries from the \
221221
package in current working directory is no longer supported, \
222222
use `cargo install --path .` instead. \
223223
Use `cargo build` if you want to simply build the package."

src/doc/man/cargo-install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Specific commit to use when installing from git.
114114
{{/option}}
115115

116116
{{#option "`--path` _path_" }}
117-
Filesystem path to local crate to install.
117+
Filesystem path to local crate to install from.
118118
{{/option}}
119119

120120
{{#option "`--list`" }}

src/doc/man/generated_txt/cargo-install.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ OPTIONS
114114
Specific commit to use when installing from git.
115115

116116
--path path
117-
Filesystem path to local crate to install.
117+
Filesystem path to local crate to install from.
118118

119119
--list
120120
List all installed packages and their versions.

src/doc/src/commands/cargo-install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ treated as a caret requirement like Cargo dependencies are.</dd>
117117

118118

119119
<dt class="option-term" id="option-cargo-install---path"><a class="option-anchor" href="#option-cargo-install---path"></a><code>--path</code> <em>path</em></dt>
120-
<dd class="option-desc">Filesystem path to local crate to install.</dd>
120+
<dd class="option-desc">Filesystem path to local crate to install from.</dd>
121121

122122

123123
<dt class="option-term" id="option-cargo-install---list"><a class="option-anchor" href="#option-cargo-install---list"></a><code>--list</code></dt>

src/etc/man/cargo-install.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ Specific commit to use when installing from git.
143143
.sp
144144
\fB\-\-path\fR \fIpath\fR
145145
.RS 4
146-
Filesystem path to local crate to install.
146+
Filesystem path to local crate to install from.
147147
.RE
148148
.sp
149149
\fB\-\-list\fR

tests/testsuite/cargo_install/help/stdout.log

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Options:
1313
--branch <BRANCH> Branch to use when installing from git
1414
--tag <TAG> Tag to use when installing from git
1515
--rev <SHA> Specific commit to use when installing from git
16-
--path <PATH> Filesystem path to local crate to install
16+
--path <PATH> Filesystem path to local crate to install from
1717
--root <DIR> Directory to install packages into
1818
-f, --force Force overwriting existing crates or binaries
1919
--no-track Do not save tracking information

tests/testsuite/install.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,7 +1195,7 @@ fn installs_from_cwd_by_default() {
11951195

11961196
p.cargo("install")
11971197
.with_stderr_contains(
1198-
"warning: Using `cargo install` to install the binaries for the \
1198+
"warning: Using `cargo install` to install the binaries from the \
11991199
package in current working directory is deprecated, \
12001200
use `cargo install --path .` instead. \
12011201
Use `cargo build` if you want to simply build the package.",
@@ -1223,7 +1223,7 @@ fn installs_from_cwd_with_2018_warnings() {
12231223
p.cargo("install")
12241224
.with_status(101)
12251225
.with_stderr_contains(
1226-
"error: Using `cargo install` to install the binaries for the \
1226+
"error: Using `cargo install` to install the binaries from the \
12271227
package in current working directory is no longer supported, \
12281228
use `cargo install --path .` instead. \
12291229
Use `cargo build` if you want to simply build the package.",

0 commit comments

Comments
 (0)