From ed88d082a5d4f3099bde666e5651cfc9dae4ab4f Mon Sep 17 00:00:00 2001 From: Bas Zalmstra Date: Fri, 29 Sep 2023 16:44:59 +0200 Subject: [PATCH] fix: ignore invalid requirements --- crates/rattler_installs_packages/src/core_metadata.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/rattler_installs_packages/src/core_metadata.rs b/crates/rattler_installs_packages/src/core_metadata.rs index 9c16742e..74111193 100644 --- a/crates/rattler_installs_packages/src/core_metadata.rs +++ b/crates/rattler_installs_packages/src/core_metadata.rs @@ -27,7 +27,12 @@ impl TryFrom<&[u8]> for WheelCoreMetadata { let mut requires_dist = Vec::new(); for req_str in parsed.take_all("Requires-Dist").into_iter() { - requires_dist.push(req_str.parse()?); + match req_str.parse() { + Err(e) => { + tracing::error!("ignoring Requires-Dist: {req_str}, failed to parse: {e}") + } + Ok(req) => requires_dist.push(req), + } } let requires_python = match parsed.maybe_take("Requires-Python")? {