Repository navigation
Fix macOS graphics detection through installer terminal input - #31
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The installer launches Termium with stdin reopened from
/dev/tty. Native macOS returnsPOLLNVALforpoll()on that device, so graphics detection immediately falls back to ASCII even when the terminal supports Kitty graphics. A direct launch works. Increasing the timeout in v0.2.3 could not fix that failure.Use
select()for bounded terminal-query waits, retain the one-second graphics deadlines, and log probe errors and the auto-selected renderer. Add subprocess/PTY tests covering direct launch, explicit/dev/ttyredirection, the installer-style pipe handoff, delayed Kitty/Sixel replies, and no-response ASCII fallback.Before-fix evidence: native Apple Silicon probe run passes direct launch and fails all three redirected graphics cases with
POLLNVALandrenderer=tcell. The same tests pass on Linux. The temporary investigation workflow is removed from the final diff; tests run in normal platform CI.After-fix evidence: all five cases pass on Linux, Apple Silicon, and Intel macOS in the native probe run. The before-fix run fails the redirected graphics cases on both Macs.
Local validation: Go suites with race detector and go vet passed. Includes v0.2.4 release notes.