From d86d99e0021258c701deeb293ab3b192ceb1d9aa Mon Sep 17 00:00:00 2001 From: cloudhead Date: Mon, 26 Feb 2024 12:10:34 +0100 Subject: [PATCH] cli: Fix `rad config` bugs The command was unable to deal with an invalid config. We fix this by introducing a way to load the user's home without loading the config. --- radicle-cli/src/commands/config.rs | 33 +++++++++++++++++---- radicle-cli/src/main.rs | 2 +- radicle-cli/src/terminal.rs | 47 +++++++++++++++++------------- 3 files changed, 55 insertions(+), 27 deletions(-) diff --git a/radicle-cli/src/commands/config.rs b/radicle-cli/src/commands/config.rs index 3581a982..906bdc24 100644 --- a/radicle-cli/src/commands/config.rs +++ b/radicle-cli/src/commands/config.rs @@ -2,8 +2,11 @@ use std::ffi::OsString; use std::path::Path; use std::process; +use std::str::FromStr; use anyhow::anyhow; +use radicle::node::Alias; +use radicle::profile::Config; use crate::terminal as term; use crate::terminal::args::{Args, Error, Help}; @@ -18,11 +21,10 @@ Usage rad config [