Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
term/editor: Use `cfg`-attribute instead of macro
Lorenz Leutgeb committed 2 months ago
commit 450b664ad80c42ac452407008aeca2a8140c4f1e
parent 8fb2d96b5cdbe629b2e25bb968c76c381b9f2be2
1 file changed +2 -1
modified crates/radicle-term/src/editor.rs
@@ -223,7 +223,8 @@ fn default_editor() -> Option<OsString> {

    // On macOS, `nano` is installed by default and it's what most users are used to
    // in the terminal.
-
    if cfg!(target_os = "macos") && exists("nano") {
+
    #[cfg(target_os = "macos")]
+
    if exists("nano") {
        return Some("nano".into());
    }
    // If all else fails, we try `vi`. It's usually installed on most unix-based systems.