fix: skip resize watcher's SIGWINCH signal on non-Unix targets
commit
6411dbbfix: skip resize watcher's SIGWINCH signal on non-Unix targets
fixes: Windows CI build, broken by unconditional signal_hook::iterator/SIGWINCH use with no Windows equivalent Assisted-by: Claude:claude-sonnet-5
Reviews
No reviews of this commit yet — record a verdict below.
Start a review
crates/git-ents/src/debug_session.rs
@@ -105,6 +105,10 @@
/// sending the new `(cols, rows)` through `tx` each time. `crossterm`'s own
/// event reader also reports resizes, but isn't an option here — we forward
/// raw stdin bytes rather than events it would parse and consume them from.
+///
+/// `SIGWINCH` doesn't exist outside Unix, so there's no resize forwarding
+/// on other platforms.
+#[cfg(unix)]
fn spawn_resize_watcher(tx: tokio::sync::mpsc::UnboundedSender<(u16, u16)>) {
let Ok(mut signals) = signal_hook::iterator::Signals::new([signal_hook::consts::SIGWINCH])
else {
@@ -121,3 +125,6 @@
}
});
}
+
+#[cfg(not(unix))]
+fn spawn_resize_watcher(_tx: tokio::sync::mpsc::UnboundedSender<(u16, u16)>) {}