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 3 months ago
commit cbdf65dd0c022f3a72936073856ffdb685d05837
parent 7a28d779c28d96dafe3d2a3dad0c9991f629f4fe
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.