Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
ssh: provide path on connect error
Fintan Halpenny committed 8 months ago
commit 21c112c4c42a92d66d24bb26b58178bfffe203ad
parent 7d441f2b8d8030f24aac3be82ebd5dca1436ae22
1 file changed +12 -1
modified crates/radicle-ssh/src/agent/client.rs
@@ -40,6 +40,12 @@ pub enum Error {
        var: String,
        source: std::env::VarError,
    },
+
    #[error("Unable to connect SSH agent using the path '{path}': {source}")]
+
    Connect {
+
        path: String,
+
        #[source]
+
        source: std::io::Error,
+
    },
    #[error("I/O error while communicating with SSH agent: {0}")]
    Io(#[from] std::io::Error),
}
@@ -80,7 +86,12 @@ impl AgentClient<Stream> {
                    source: err,
                })
            }
-
            Err(err) => return Err(Error::Io(err)),
+
            Err(err) => {
+
                return Err(Error::Connect {
+
                    path: path.display().to_string(),
+
                    source: err,
+
                })
+
            }
            Ok(stream) => stream,
        };