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.
This commit is contained in:
Adrian Duke 2026-01-27 16:19:34 +00:00 committed by Lorenz Leutgeb
parent b5e8776efd
commit dd13eed1d0
2 changed files with 4 additions and 2 deletions

View File

@ -38,7 +38,7 @@ $ rad seed
╭───────────────────────────────────────────────────────────╮
│ Repository Name Policy Scope │
├───────────────────────────────────────────────────────────┤
│ rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji block all
│ rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji block
╰───────────────────────────────────────────────────────────╯
```

View File

@ -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([