Skip to content

Commit 4269a31

Browse files
committed
Suggest partial cargo add command
1 parent f013def commit 4269a31

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/cargo/ops/cargo_install.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,8 @@ impl<'cfg, 'a> InstallablePackage<'cfg, 'a> {
209209
bail!(
210210
"there is nothing to install in `{}`, because it has no binaries\n\
211211
`cargo install` is only for installing programs, and can't be used with libraries.\n\
212-
To use a library crate, add it as a dependency to a Cargo project with `cargo add {}`.",
212+
To use a library crate, add it as a dependency to a Cargo project with `cargo add`.",
213213
pkg,
214-
pkg.name()
215214
);
216215
}
217216

tests/testsuite/install.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ fn no_binaries() {
730730
"\
731731
[ERROR] there is nothing to install in `foo v0.0.1 ([..])`, because it has no binaries[..]
732732
[..]
733-
To use a library crate, add it as a dependency to a Cargo project with `cargo add foo`.",
733+
To use a library crate, add it as a dependency to a Cargo project with `cargo add`.",
734734
)
735735
.run();
736736
}

0 commit comments

Comments
 (0)