Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
Support `RAD_PASSPHRASE` in `signer` method
Alexis Sellier committed 3 years ago
commit d6a95e4d583a7390c3afa118c7576591912e9206
parent 1d798a80b4f957a454060d9533c94afbf33e0d9e
1 file changed +3 -1
modified radicle-cli/src/terminal/io.rs
@@ -177,7 +177,9 @@ pub fn abort<D: fmt::Display>(prompt: D) -> bool {

/// Get the signer. First we try getting it from ssh-agent, otherwise we prompt the user.
pub fn signer(profile: &Profile) -> anyhow::Result<Box<dyn Signer>> {
-
    let signer = if let Ok(signer) = profile.signer() {
+
    let signer = if let Ok(passphrase) = read_passphrase_from_env_var() {
+
        MemorySigner::load(&profile.keystore, passphrase)?.boxed()
+
    } else if let Ok(signer) = profile.signer() {
        signer.boxed()
    } else {
        let passphrase = secret_input();