Fix Windows PR diff pager launch - #871
Open
RasputinKaiser wants to merge 1 commit into
Open
Conversation
Owner
|
Hey @RasputinKaiser, any idea why this fails on Windows? Is there an existing issue on the cli/cli repo for this? |
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.
Summary
This avoids shelling out to
gh pr difffor the full-screen PR diff flow. Instead,gh-dashnow fetches the PR diff through the existinggo-ghauthenticated REST path and streams that diff into the configured pager directly.That keeps
pager.diffbehavior for common values likelessanddelta --paging always, while avoiding the extragh -> pagerprocess chain that can fail on Windows with onlyexit status 4surfaced in the TUI.It also adds coverage for:
host/owner/repoGH_PAGERErrMsgcmd /Cand Unix shell command construction for pagersDuplicate/competition check before opening:
gh issue view 866 --repo dlvhdr/gh-dash --json number,title,state,comments,updatedAt,urlshowed the issue still open with no comments.gh pr list --repo dlvhdr/gh-dash --state all --search "866 OR \"pager issue\" OR \"exit status 4\""returned no matching PRs.AI usage disclosure: this PR was prepared with OpenAI Codex assistance for investigation, implementation, duplicate checks, and local verification. The diff and verification output were reviewed in the Codex session before submission.
How Did You Test this Change?
mise exec go@1.25.10 -- go test ./internal/data ./internal/tui/commonmise exec go@1.25.10 -- go test ./...git diff --checkImages/Videos
Not applicable.