mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Test: install bin with --path
outside current workspace
This commit is contained in:
parent
44f650f260
commit
76301ebab9
@ -530,15 +530,28 @@ fn install_relative_path_outside_current_ws() {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
p.cargo("install --path ../bar/foo")
|
p.cargo("install --path ../bar/foo")
|
||||||
|
.with_stderr(&format!(
|
||||||
|
"\
|
||||||
|
[INSTALLING] foo v0.0.1 ([..]/bar/foo)
|
||||||
|
[COMPILING] foo v0.0.1 ([..]/bar/foo)
|
||||||
|
[FINISHED] release [..]
|
||||||
|
[INSTALLING] {home}/bin/foo[EXE]
|
||||||
|
[INSTALLED] package `foo v0.0.1 ([..]/bar/foo)` (executable `foo[EXE]`)
|
||||||
|
[WARNING] be sure to add [..]
|
||||||
|
",
|
||||||
|
home = cargo_home().display(),
|
||||||
|
))
|
||||||
|
.run();
|
||||||
|
|
||||||
|
// Validate the workspace error message to display available targets.
|
||||||
|
p.cargo("install --path ../bar/foo --bin")
|
||||||
.with_status(101)
|
.with_status(101)
|
||||||
.with_stderr(
|
.with_stderr(
|
||||||
"\
|
"\
|
||||||
[ERROR] current package believes it's in a workspace when it's not:
|
[ERROR] \"--bin\" takes one argument.
|
||||||
current: [CWD]/../bar/foo/Cargo.toml
|
Available binaries:
|
||||||
workspace: [CWD]/Cargo.toml
|
foo
|
||||||
|
|
||||||
this may be fixable by adding `../bar/foo` to the `workspace.members` [..]
|
|
||||||
Alternatively, [..]
|
|
||||||
",
|
",
|
||||||
)
|
)
|
||||||
.run();
|
.run();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user