* targeted error message for virtual manifests
* assert correct error message
}
};
if specs.is_empty() {
- bail!("Workspace contains no members to be compiled. \
- Be sure all workspace members haven't been excluded")
- } else {
- Ok(specs)
+ match ws.is_virtual() {
+ true => bail!("manifest path `{}` contains no package: The manifest is virtual, \
+ and the workspace has no members.", ws.root().display()),
+ false => bail!("no packages to compile"),
+ }
}
+ Ok(specs)
}
}
assert_that(
p.cargo("build").arg("--all").arg("--exclude").arg("foo"),
execs().with_stderr_does_not_contain("[..]virtual[..]")
+ .with_stderr_contains("[..]no packages to compile")
.with_status(101));
}