From 4e9e438f4182c108eda607fdcbe890166c1301eb Mon Sep 17 00:00:00 2001 From: cloudhead Date: Wed, 31 Jan 2024 13:54:39 +0100 Subject: [PATCH] cli: Don't error if ssh-agent isn't running --- radicle-cli/src/commands/auth.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/radicle-cli/src/commands/auth.rs b/radicle-cli/src/commands/auth.rs index a15a9a90..fc1a60a1 100644 --- a/radicle-cli/src/commands/auth.rs +++ b/radicle-cli/src/commands/auth.rs @@ -193,10 +193,16 @@ pub fn authenticate(options: Options, profile: &Profile) -> anyhow::Result<()> { ssh::keystore::MemorySigner::load(&profile.keystore, Some(passphrase)) .map_err(|_| anyhow!("`{RAD_PASSPHRASE}` is invalid"))?; return Ok(()); - }; + } - // ssh-agent is the de-facto solution. - anyhow::bail!("ssh-agent not running"); + term::print(term::format::dim( + "Nothing to do, ssh-agent is not running.", + )); + term::print(term::format::dim( + "You will be prompted for a passphrase when necessary.", + )); + + Ok(()) } /// Register key with ssh-agent.