Skip to content

Conversation

meowgorithm
Copy link
Member

This fixes broken output when no TTY is present.

Fixes #34
Supersedes #31

@meowgorithm meowgorithm requested a review from caarlos0 as a code owner June 19, 2025 15:36
@meowgorithm meowgorithm requested a review from Copilot June 19, 2025 15:38
Copilot

This comment was marked as outdated.

@meowgorithm meowgorithm requested a review from Copilot June 19, 2025 15:42
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses broken output issues by preventing background color detection when the output is not a TTY. Key changes include an upgrade of the golang.org/x/sys dependency in go.mod and a conditional check in fang.go to only detect dark backgrounds if stdout is a TTY.

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
go.mod Upgraded golang.org/x/sys from v0.31.0 to v0.33.0 for compatibility with TTY handling improvements.
fang.go Added a conditional check using term.IsTerminal to guard background color detection.
Comments suppressed due to low confidence (1)

go.mod:33

  • Ensure that the dependency upgrade to v0.33.0 of golang.org/x/sys is compatible with the rest of the codebase, particularly regarding terminal handling improvements.
	golang.org/x/sys v0.33.0 // indirect

@caarlos0 caarlos0 merged commit 004b40b into main Jun 19, 2025
18 checks passed
@caarlos0 caarlos0 deleted the is-tty branch June 19, 2025 16:08
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 isn't compatible with fzf
2 participants