Skip to content

Commit

Permalink
Fix testing of terminal on non-unix systems. Variant 2
Browse files Browse the repository at this point in the history
  • Loading branch information
s-macke committed Jun 20, 2024
1 parent 77d7e73 commit c372a1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type UI struct {

// InitTerminal initializes the terminal and sets the UI dimensions
func InitTerminal(minY time.Duration, maxY time.Duration) *UI {
if !terminal.IsTerminal(int(os.Stdin.Fd())) {
if !terminal.IsTerminal(int(os.Stdout.Fd())) {
panic("Not a terminal")
}
ui := UI{
Expand Down

0 comments on commit c372a1a

Please sign in to comment.