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 af38b9bca6c8eb399fd85bb329e09fc9e9a122b0
parent 14fb67364e99f5201cd07d664e2094c1926df602
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.