From 0b169b07ab285fe52de47e490152798e5ff67fac Mon Sep 17 00:00:00 2001 From: rene-d <10288093+rene-d@users.noreply.github.com> Date: Tue, 4 Jan 2022 17:41:28 +0100 Subject: [PATCH] ignore GitHub action files (#53) Co-authored-by: rene-d --- src/crates.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/crates.rs b/src/crates.rs index ef99123..a328a0d 100644 --- a/src/crates.rs +++ b/src/crates.rs @@ -138,6 +138,9 @@ pub async fn sync_crates_files( if p == Path::new("config.json") { return true; } + if p.starts_with(".github/") { + return true; + } // DEV: if dev_reduced_crates is enabled, only download crates that start with z #[cfg(feature = "dev_reduced_crates")] @@ -167,7 +170,12 @@ pub async fn sync_crates_files( // Download one crate for each of the versions in the crate file for line in Cursor::new(data).lines() { let line = line.unwrap(); - let c: CrateEntry = serde_json::from_str(&line).unwrap(); + let c: CrateEntry = match serde_json::from_str(&line) { + Ok(c) => c, + Err(_) => { + continue; + } + }; changed_crates.push(c); }