From 73f3c496892bdcf1e4d5ce5d4bf1ff6e77e712e2 Mon Sep 17 00:00:00 2001 From: cloudhead Date: Wed, 7 Aug 2024 10:40:46 +0200 Subject: [PATCH] cli: Don't fail on `rad ls` if project is invalid --- radicle-cli/src/commands/ls.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/radicle-cli/src/commands/ls.rs b/radicle-cli/src/commands/ls.rs index d8852f93..c26cd840 100644 --- a/radicle-cli/src/commands/ls.rs +++ b/radicle-cli/src/commands/ls.rs @@ -122,7 +122,13 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> { if !seeded && options.seeded { continue; } - let proj = doc.project()?; + let proj = match doc.project() { + Ok(p) => p, + Err(e) => { + log::error!(target: "cli", "Error loading project payload for {rid}: {e}"); + continue; + } + }; let head = term::format::oid(head).into(); rows.push([