From eea3617781d50dc9f908e98f10c39a9ed125d08f Mon Sep 17 00:00:00 2001 From: justarandomgeek Date: Wed, 25 Feb 2026 23:24:37 -0500 Subject: [PATCH] use `CONIN$` instead of `/dev/tty` on windows --- CHANGELOG.md | 2 ++ crates/radicle-term/src/editor.rs | 3 +++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd58235c..b107af42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 indistinguishable from `[::1]:8776`. Since a port number is always required along a host when providing an address, IPv6 addresses now always require brackets to avoid confusion. +- On Windows, use `CONIN$` to reopen the terminal input stream, instead of refusing + to launch an editor for `radicle-remote-helper` ## Deprecations diff --git a/crates/radicle-term/src/editor.rs b/crates/radicle-term/src/editor.rs index 6c17d32c..c099f96b 100644 --- a/crates/radicle-term/src/editor.rs +++ b/crates/radicle-term/src/editor.rs @@ -162,6 +162,9 @@ impl Editor { .write(true) .open("/dev/tty")?; process::Stdio::from(tty) + } else if cfg!(windows) { + let tty = fs::OpenOptions::new().read(true).open("CONIN$")?; + process::Stdio::from(tty) } else { return Err(io::Error::new( io::ErrorKind::Unsupported,