test: stabilize Windows development checks - #14155
Draft
scarletkc wants to merge 1 commit into
Draft
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.
Fixes #14156
Description
Windows development checks had four platform-specific failure modes:
core.autocrlf=truecheckout converted Go files to CRLF, so thegofmtformatter reported hundreds of unchanged files.GH_PAGERandPAGERfrom the invoking shell when a test case did not set them.io.Pipe, which prevented Bubble Tea forms from completing on Windows.This change pins Go files to LF in
.gitattributes, isolates pager environment variables, uses an OS pipe for the Huh event loop, and quotes a slash-normalized temporary credential path.The changes affect development and test behavior only. Production
ghbehavior is unchanged.How did you test this change?
On Windows with Git's global
core.autocrlf=true, I checked out the committed branch into a fresh worktree and inspected representative Go files withgit ls-files --eol. Their index and worktree forms were both LF, and the repository-wide linter no longer proposed formatter changes.I kept
GH_PAGER=catandPAGER=catin the outer shell while exercising the full test suite. The pager cases used their own declared environments, the Huh form interactions completed, and the credential updater left its file in the temporary directory instead of creating path-shaped files in the repository root.Key points
*.go; this avoids changing line-ending policy for unrelated file types.os.Pipepreserves the real Bubble Tea event-loop coverage while providing a native cross-platform pipe.Notes for reviewers
Start with
.gitattributesandinternal/prompter/huh_prompter_test.go; those address the two failures that prevented repository-wide Windows checks from completing. The pager and credential changes isolate the remaining test-only leaks discovered by that run.Authorship and follow-up
Who wrote this:
Who answers review comments: