Suggest cargo add when installing library crate

This commit is contained in:
TrAyZeN 2022-11-22 22:56:59 +01:00
parent ba607b23db
commit 98edd706ad
2 changed files with 3 additions and 3 deletions

View File

@ -209,8 +209,8 @@ impl<'cfg, 'a> InstallablePackage<'cfg, 'a> {
bail!(
"there is nothing to install in `{}`, because it has no binaries\n\
`cargo install` is only for installing programs, and can't be used with libraries.\n\
To use a library crate, add it as a dependency in a Cargo project instead.",
pkg
To use a library crate, add it as a dependency to a Cargo project with `cargo add`.",
pkg,
);
}

View File

@ -730,7 +730,7 @@ fn no_binaries() {
"\
[ERROR] there is nothing to install in `foo v0.0.1 ([..])`, because it has no binaries[..]
[..]
[..]",
To use a library crate, add it as a dependency to a Cargo project with `cargo add`.",
)
.run();
}