From dd13eed1d03729cb3224df6400cd7b8c3cf653d1 Mon Sep 17 00:00:00 2001 From: Adrian Duke Date: Tue, 27 Jan 2026 16:19:34 +0000 Subject: [PATCH] cli: Do not print scope in block table Previous implementation used the default scope when a scope wasn't present. Scope is not present when the policy is block, because block doesn't have a scope. Instead use an empty string when printing the block policy. --- crates/radicle-cli/examples/rad-block.md | 2 +- crates/radicle-cli/src/commands/seed.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/radicle-cli/examples/rad-block.md b/crates/radicle-cli/examples/rad-block.md index 41335027..a29630cd 100644 --- a/crates/radicle-cli/examples/rad-block.md +++ b/crates/radicle-cli/examples/rad-block.md @@ -38,7 +38,7 @@ $ rad seed ╭───────────────────────────────────────────────────────────╮ │ Repository Name Policy Scope │ ├───────────────────────────────────────────────────────────┤ -│ rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji block all │ +│ rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji block │ ╰───────────────────────────────────────────────────────────╯ ``` diff --git a/crates/radicle-cli/src/commands/seed.rs b/crates/radicle-cli/src/commands/seed.rs index 7482a835..edc31149 100644 --- a/crates/radicle-cli/src/commands/seed.rs +++ b/crates/radicle-cli/src/commands/seed.rs @@ -84,7 +84,9 @@ pub fn seeding(profile: &Profile) -> anyhow::Result<()> { .repository(rid) .and_then(|repo| repo.project().map(|proj| proj.name().to_string())) .unwrap_or_default(); - let scope = policy.scope().unwrap_or_default().to_string(); + let scope = policy + .scope() + .map_or(String::new(), |scope| scope.to_string()); let policy = term::format::policy(&Policy::from(policy)); t.push([