Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
Remove old `Profile::paths` function
Alexis Sellier committed 3 years ago
commit b1012014fe58f93d5b4b1a78ff41b97f34ffb7f0
parent b4f44f39f2c5df4b4ca0115f3d8575ae27f288c4
4 files changed +5 -10
modified radicle-cli/src/commands/inspect.rs
@@ -128,7 +128,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {

    if options.refs {
        let path = profile
-
            .paths()
+
            .home
            .storage()
            .join(id.urn())
            .join("refs")
modified radicle-cli/src/commands/rm.rs
@@ -81,7 +81,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
    let id = options.id;

    if let Ok(Some(_)) = storage.get(signer.public_key(), id.to_owned()) {
-
        let namespace = profile.paths().storage().join(id.urn());
+
        let namespace = profile.home.storage().join(id.urn());

        if !options.confirm
            || term::confirm(format!(
modified radicle-cli/src/commands/self.rs
@@ -86,19 +86,19 @@ fn all(profile: &Profile) -> anyhow::Result<()> {
    let ssh_long = ssh::fmt::key(node_id);
    table.push(["Key (full)", &term::format::tertiary(ssh_long)]);

-
    let storage_path = profile.paths().storage();
+
    let storage_path = profile.home.storage();
    table.push([
        "Storage (git)",
        &term::format::tertiary(storage_path.display()),
    ]);

-
    let keys_path = profile.paths().keys();
+
    let keys_path = profile.home.keys();
    table.push([
        "Storage (keys)",
        &term::format::tertiary(keys_path.display()),
    ]);

-
    let node_path = profile.paths().node();
+
    let node_path = profile.home.node();
    table.push([
        "Node (socket)",
        &term::format::tertiary(node_path.join("radicle.sock").display()),
modified radicle/src/profile.rs
@@ -137,11 +137,6 @@ impl Profile {
    pub fn socket(&self) -> PathBuf {
        self.home.socket()
    }
-

-
    /// Get `Paths` of profile
-
    pub fn paths(&self) -> &Home {
-
        &self.home
-
    }
}

/// Get the path to the radicle home folder.