Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
radicle/explorer: Allow overriding default URL
Lorenz Leutgeb committed 7 months ago
commit 5b36933c1d7d37652e3e54de09f39068a1c8c2ed
parent 60629335406f88555e06490c21cc51b41aad3e7b
1 file changed +3 -2
modified crates/radicle/src/explorer.rs
@@ -80,7 +80,7 @@ impl std::fmt::Display for ExplorerUrl {
    }
}

-
/// A public explorer, eg. `https://app.radicle.xyz`.
+
/// A public explorer.
#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
#[serde(transparent)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
@@ -89,7 +89,8 @@ pub struct Explorer(String);
impl Default for Explorer {
    fn default() -> Self {
        Self(String::from(
-
            "https://app.radicle.xyz/nodes/$host/$rid$path",
+
            std::option_env!("RADICLE_EXPLORER")
+
                .unwrap_or("https://app.radicle.xyz/nodes/$host/$rid$path"),
        ))
    }
}