0 => ws.current()?,
1 => ws.members()
.find(|pkg| pkg.name() == xs[0])
- .ok_or_else(||
+ .ok_or_else(||
CargoError::from(
format!("package `{}` is not a member of the workspace", xs[0]))
)?,
if !options.filter.is_specific() {
bail!("`cargo run` requires that a project only have one \
executable; use the `--bin` option to specify which one \
- to run ({})", bins.join(", "))
+ to run\navailable binaries: {}", bins.join(", "))
} else {
bail!("`cargo run` can run at most one executable, but \
multiple were specified")
assert_that(p.cargo("run"),
execs().with_status(101).with_stderr("\
error: `cargo run` requires that a project only have one executable; \
-use the `--bin` option to specify which one to run (foo1, foo2)"));
+use the `--bin` option to specify which one to run\navailable binaries: foo1, foo2"));
}
execs().with_status(101)
.with_stderr("[ERROR] `cargo run` requires that a project only \
have one executable; use the `--bin` option \
- to specify which one to run ([..])\n"));
+ to specify which one to run\navailable binaries: [..]\n"));
}
#[test]
execs().with_status(101)
.with_stderr("[ERROR] `cargo run` requires that a project only \
have one executable; use the `--bin` option \
- to specify which one to run ([..])\n"));
+ to specify which one to run\navailable binaries: [..]\n"));
}
#[test]