Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion setups/owl/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

11 changes: 11 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.".red()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error message incorrectly claims no nest is configured

Low Severity

The error message "No nest configured and stdin is not interactive" is misleading when switch_nest() is called via owl nest switch with an existing nest configured. In this case, get_nest() succeeds (returning the current nest), then switch_nest() is called explicitly for switching. The TTY check fails, but the message incorrectly states "No nest configured" when a nest actually is configured. The message text doesn't accurately reflect all code paths that can trigger it.

Fix in Cursor Fix in Web

);
eprintln!("Run: {} < /dev/tty", "owl nest switch".cyan());
std::process::exit(1);
}

let mut config = get_config();

let nests = list_nests();
Expand Down
Loading