Skip to content

Commit 3d6de41

Browse files
authored
Ignore malformed manifests on git dependencies
1 parent bc6fda5 commit 3d6de41

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/cargo/ops/cargo_read_manifest.rs

+10-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,16 @@ fn read_nested_packages(path: &Path,
121121

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

124-
let (manifest, nested) = read_manifest(&manifest_path, source_id, config)?;
124+
let result = read_manifest(&manifest_path, source_id, config);
125+
126+
// Ignore malformed manifests
127+
if result.is_err() {
128+
info!("skipping malformed package found at `{}`",
129+
path.to_string_lossy());
130+
return Ok(());
131+
}
132+
133+
let (manifest, nested) = result.unwrap();
125134
let manifest = match manifest {
126135
EitherManifest::Real(manifest) => manifest,
127136
EitherManifest::Virtual(..) => return Ok(()),

0 commit comments

Comments
 (0)