Merge #2658
2658: Only add features flags if non-empty r=matklad a=edwin0cheng This prevent error when disabled `all-features` in a cargo workspace, because of `--features is not allowed in the root of a virtual workspace` when running `cargo metadata`. Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
This commit is contained in:
commit
97f01396ed
@ -165,7 +165,7 @@ pub fn from_cargo_metadata(
|
||||
// FIXME: `NoDefaultFeatures` is mutual exclusive with `SomeFeatures`
|
||||
// https://github.com/oli-obk/cargo_metadata/issues/79
|
||||
meta.features(CargoOpt::NoDefaultFeatures);
|
||||
} else {
|
||||
} else if cargo_features.features.len() > 0 {
|
||||
meta.features(CargoOpt::SomeFeatures(cargo_features.features.clone()));
|
||||
}
|
||||
if let Some(parent) = cargo_toml.parent() {
|
||||
|
Loading…
Reference in New Issue
Block a user