Merge pull request #717 from Eijebong/metadata
Update cargo_metadata to 0.7
This commit is contained in:
commit
048ce3cb1c
@ -34,7 +34,7 @@ required-features = ["rustc_tests"]
|
||||
|
||||
[dependencies]
|
||||
byteorder = { version = "1.1", features = ["i128"]}
|
||||
cargo_metadata = { version = "0.6", optional = true }
|
||||
cargo_metadata = { version = "0.7", optional = true }
|
||||
directories = { version = "1.0", optional = true }
|
||||
rustc_version = { version = "0.2.3", optional = true }
|
||||
env_logger = "0.6"
|
||||
|
@ -83,10 +83,11 @@ fn list_targets() -> impl Iterator<Item=cargo_metadata::Target> {
|
||||
Path::new(&m).canonicalize().unwrap()
|
||||
);
|
||||
|
||||
let mut metadata = if let Ok(metadata) = cargo_metadata::metadata(
|
||||
manifest_path.as_ref().map(AsRef::as_ref),
|
||||
)
|
||||
{
|
||||
let mut cmd = cargo_metadata::MetadataCommand::new();
|
||||
if let Some(ref manifest_path) = manifest_path {
|
||||
cmd.manifest_path(manifest_path);
|
||||
}
|
||||
let mut metadata = if let Ok(metadata) = cmd.exec() {
|
||||
metadata
|
||||
} else {
|
||||
show_error(format!("Could not obtain Cargo metadata"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user