cargo fetch: Display workspace warnings.

This commit is contained in:
Eric Huss 2019-08-12 16:03:15 -07:00
parent 6aca041592
commit 22619a29e3
2 changed files with 20 additions and 0 deletions

View file

@ -16,6 +16,7 @@ pub fn fetch<'a>(
ws: &Workspace<'a>,
options: &FetchOptions<'a>,
) -> CargoResult<(Resolve, PackageSet<'a>)> {
ws.emit_warnings()?;
let (packages, resolve) = ops::resolve_ws(ws)?;
let jobs = Some(1);

View file

@ -112,3 +112,22 @@ fn fetch_platform_specific_dependencies() {
.with_stderr_does_not_contain("[DOWNLOADED] d1 v1.2.3 [..]")
.run();
}
#[cargo_test]
fn fetch_warning() {
let p = project()
.file(
"Cargo.toml",
r#"
[package]
name = "foo"
version = "1.0.0"
misspelled = "wut"
"#,
)
.file("src/lib.rs", "")
.build();
p.cargo("fetch")
.with_stderr("[WARNING] unused manifest key: package.misspelled")
.run();
}