Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
cli: use Doc::canonical in rad inspect
Fintan Halpenny committed 3 years ago
commit 92a14b671f5c4ed99618dd38f8bf60bb6987660a
parent 327ebd4d2a65b95f4eee9b412401af007a7bfad0
1 file changed +4 -3
modified radicle-cli/src/commands/inspect.rs
@@ -8,7 +8,7 @@ use anyhow::{anyhow, Context as _};
use chrono::prelude::*;
use json_color::{Color, Colorizer};

-
use radicle::crypto::Unverified;
+
use radicle::crypto::{Unverified, Verified};
use radicle::identity::Untrusted;
use radicle::identity::{Doc, Id};
use radicle::storage::{ReadRepository, ReadStorage};
@@ -120,9 +120,10 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
    let profile = ctx.profile()?;
    let storage = &profile.storage;
    let signer = term::signer(&profile)?;
-
    let project = storage
-
        .get(signer.public_key(), id)?
+
    let repo = storage
+
        .repository(id)
        .context("No project with the given RID exists")?;
+
    let project = Doc::<Verified>::canonical(&repo)?;

    match options.target {
        Target::Refs => {