Skip to content

Commit

Permalink
Ignore malformed manifests on git dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
fantoine authored May 5, 2017
1 parent bc6fda5 commit 3d6de41
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/cargo/ops/cargo_read_manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,16 @@ fn read_nested_packages(path: &Path,

let manifest_path = find_project_manifest_exact(path, "Cargo.toml")?;

let (manifest, nested) = read_manifest(&manifest_path, source_id, config)?;
let result = read_manifest(&manifest_path, source_id, config);

// Ignore malformed manifests
if result.is_err() {
info!("skipping malformed package found at `{}`",
path.to_string_lossy());
return Ok(());
}

let (manifest, nested) = result.unwrap();
let manifest = match manifest {
EitherManifest::Real(manifest) => manifest,
EitherManifest::Virtual(..) => return Ok(()),
Expand Down

0 comments on commit 3d6de41

Please sign in to comment.