From 77c1a98408a6ba60112a38f373a6b26768a3d11b Mon Sep 17 00:00:00 2001 From: Tyler Tracy Date: Sun, 1 Feb 2026 09:42:43 -0800 Subject: [PATCH 1/2] Fix infinite loop when nest selection runs non-interactively MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When running `owl nest all` via curl pipe (e.g., the quick start command), stdin is not a terminal. The nest selection loop would read empty strings from EOF repeatedly, causing "Invalid selection" to spam forever. Now detects non-interactive stdin and exits with a helpful message directing users to run `owl nest switch` manually. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/main.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main.rs b/src/main.rs index 1ebb51d..d0773c8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -875,6 +875,17 @@ fn get_nest() -> Setup { } fn switch_nest() -> Setup { + use std::io::IsTerminal; + + if !std::io::stdin().is_terminal() { + eprintln!( + "{}", + "No nest configured and stdin is not interactive. Run `owl nest switch` manually." + .red() + ); + std::process::exit(1); + } + let mut config = get_config(); let nests = list_nests(); From 6496dba2a98e8b77dcde9ca295b7df2ec79963ab Mon Sep 17 00:00:00 2001 From: Tyler Tracy Date: Sun, 1 Feb 2026 09:45:55 -0800 Subject: [PATCH 2/2] Redirect stdin from /dev/tty in setup script for interactive install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The setup.sh script now redirects stdin from /dev/tty when calling `owl nest all`, allowing interactive nest selection even when the script is piped from curl. Also improves the Rust fallback error message to show the /dev/tty workaround. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- setups/owl/setup.sh | 3 ++- src/main.rs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/setups/owl/setup.sh b/setups/owl/setup.sh index c4db51b..494ce33 100755 --- a/setups/owl/setup.sh +++ b/setups/owl/setup.sh @@ -36,5 +36,6 @@ echo "Linked owl to ~/.local/bin/owl" # Ensure ~/.local/bin is in PATH for this session export PATH="$HOME/.local/bin:$PATH" -owl nest all +# Redirect stdin from /dev/tty to allow interactive nest selection even when piped from curl +owl nest all < /dev/tty diff --git a/src/main.rs b/src/main.rs index d0773c8..7fefe22 100644 --- a/src/main.rs +++ b/src/main.rs @@ -880,9 +880,9 @@ fn switch_nest() -> Setup { if !std::io::stdin().is_terminal() { eprintln!( "{}", - "No nest configured and stdin is not interactive. Run `owl nest switch` manually." - .red() + "No nest configured and stdin is not interactive.".red() ); + eprintln!("Run: {} < /dev/tty", "owl nest switch".cyan()); std::process::exit(1); }