Skip to content

fix: #38 ask the os whether a file is a terminal, so /dev/null is not one - #39

Merged
othercodes merged 1 commit into
masterfrom
fix/38-is-terminal
Nov 30, 2026
Merged

othercodes merged 1 commit into
masterfrom
fix/38-is-terminal

Conversation

@othercodes

Copy link
Copy Markdown
Owner

Closes #38

  • output.IsTerminal asks the OS (term.IsTerminal) instead of checking for a character device, which /dev/null is too. tmetric today > /dev/null no longer renders the table as if for a terminal.
  • login and ui use the same check instead of calling term.IsTerminal each on their own.
  • Tests that need a terminal fake one by swapping output.IsTerminal, instead of relying on /dev/null; TestIsTerminal now checks that /dev/null is not one.

@othercodes othercodes self-assigned this Nov 30, 2026
@sonarqubecloud

Copy link
Copy Markdown

@othercodes
othercodes merged commit a03d1bc into master Nov 30, 2026
8 checks passed
@othercodes
othercodes deleted the fix/38-is-terminal branch November 30, 2026 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

output.IsTerminal counts /dev/null as a terminal

1 participant