Remove old `Profile::paths` function
This commit is contained in:
parent
b4f44f39f2
commit
b1012014fe
|
|
@ -128,7 +128,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
|
||||||
|
|
||||||
if options.refs {
|
if options.refs {
|
||||||
let path = profile
|
let path = profile
|
||||||
.paths()
|
.home
|
||||||
.storage()
|
.storage()
|
||||||
.join(id.urn())
|
.join(id.urn())
|
||||||
.join("refs")
|
.join("refs")
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
|
||||||
let id = options.id;
|
let id = options.id;
|
||||||
|
|
||||||
if let Ok(Some(_)) = storage.get(signer.public_key(), id.to_owned()) {
|
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
|
if !options.confirm
|
||||||
|| term::confirm(format!(
|
|| term::confirm(format!(
|
||||||
|
|
|
||||||
|
|
@ -86,19 +86,19 @@ fn all(profile: &Profile) -> anyhow::Result<()> {
|
||||||
let ssh_long = ssh::fmt::key(node_id);
|
let ssh_long = ssh::fmt::key(node_id);
|
||||||
table.push(["Key (full)", &term::format::tertiary(ssh_long)]);
|
table.push(["Key (full)", &term::format::tertiary(ssh_long)]);
|
||||||
|
|
||||||
let storage_path = profile.paths().storage();
|
let storage_path = profile.home.storage();
|
||||||
table.push([
|
table.push([
|
||||||
"Storage (git)",
|
"Storage (git)",
|
||||||
&term::format::tertiary(storage_path.display()),
|
&term::format::tertiary(storage_path.display()),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
let keys_path = profile.paths().keys();
|
let keys_path = profile.home.keys();
|
||||||
table.push([
|
table.push([
|
||||||
"Storage (keys)",
|
"Storage (keys)",
|
||||||
&term::format::tertiary(keys_path.display()),
|
&term::format::tertiary(keys_path.display()),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
let node_path = profile.paths().node();
|
let node_path = profile.home.node();
|
||||||
table.push([
|
table.push([
|
||||||
"Node (socket)",
|
"Node (socket)",
|
||||||
&term::format::tertiary(node_path.join("radicle.sock").display()),
|
&term::format::tertiary(node_path.join("radicle.sock").display()),
|
||||||
|
|
|
||||||
|
|
@ -137,11 +137,6 @@ impl Profile {
|
||||||
pub fn socket(&self) -> PathBuf {
|
pub fn socket(&self) -> PathBuf {
|
||||||
self.home.socket()
|
self.home.socket()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get `Paths` of profile
|
|
||||||
pub fn paths(&self) -> &Home {
|
|
||||||
&self.home
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the path to the radicle home folder.
|
/// Get the path to the radicle home folder.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue