From 4ac285715f1d8fd6a2c012a9e52b63aa5bc089b8 Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Tue, 14 Jul 2026 17:00:31 +0200 Subject: [PATCH] chore: add some help from so for Sequoia command --- installer/Cargo.lock | 4 +++- installer/Cargo.toml | 7 ++++++- installer/src/config.rs | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/installer/Cargo.lock b/installer/Cargo.lock index e5d2f8b..6470ef0 100644 --- a/installer/Cargo.lock +++ b/installer/Cargo.lock @@ -176,6 +176,7 @@ dependencies = [ "crossterm_winapi", "derive_more", "document-features", + "filedescriptor", "mio", "parking_lot", "rustix", @@ -1408,10 +1409,11 @@ checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" [[package]] name = "typoena-installer" -version = "0.1.0" +version = "0.1.1" dependencies = [ "anyhow", "base64", + "crossterm", "ratatui", ] diff --git a/installer/Cargo.toml b/installer/Cargo.toml index 42388ba..8b750ec 100644 --- a/installer/Cargo.toml +++ b/installer/Cargo.toml @@ -1,9 +1,14 @@ [package] name = "typoena-installer" -version = "0.1.0" +version = "0.1.1" edition = "2024" [dependencies] anyhow = "1.0.103" base64 = "0.22.1" ratatui = "0.30.2" +# Force crossterm's poll(2)-based event reader. The default `mio` backend uses +# kqueue on macOS, which cannot register `/dev/tty` (the controlling-terminal +# device) — so a `curl … | sh` launch, where fd0 is /dev/tty rather than a pty +# slave, fails with "Failed to initialize input reader". `use-dev-tty` polls. +crossterm = { version = "0.29", features = ["use-dev-tty"] } diff --git a/installer/src/config.rs b/installer/src/config.rs index 7ae4171..320d6c8 100644 --- a/installer/src/config.rs +++ b/installer/src/config.rs @@ -152,6 +152,8 @@ fn gh_login() -> Option { fn active_wifi_ssid() -> Option { // The Wi-Fi device on a Mac is usually en0; ask networksetup for its SSID. + // Didn't work, but this command did for me: + // networksetup -listpreferredwirelessnetworks en0 | grep -v '^Preferred networks on' | head -1 | xargs let out = Command::new("networksetup") .args(["-getairportnetwork", "en0"]) .output()