Sitelet https://github.com/modem-dev/hunk/pull/1112
Skip to content

fix(pager): handle plain text output through pipes - #1112

Open
0xferrous wants to merge 1 commit into
modem-dev:mainfrom
0xferrous:fix-hunk-git-pager-epipe
Open

0xferrous wants to merge 1 commit into
modem-dev:mainfrom
0xferrous:fix-hunk-git-pager-epipe

Conversation

@0xferrous

Copy link
Copy Markdown

When Hunk wrote a large plain-text document through process.stdout, Bun could report success before all of the data had reached the pipe. Hunk then called process.exit(0), discarding the unwritten remainder. Large output was silently truncated for commands such as Git, LazyGit, and hunk pager | less.

Write directly to stdout's file descriptor and keep writing until all bytes are delivered. Treat EPIPE as a normal early exit when a downstream command stops reading, such as hunk pager | head.

When Hunk wrote a large plain-text document through process.stdout, Bun could
report success before all of the data had reached the pipe. Hunk then called
process.exit(0), discarding the unwritten remainder. Large output was silently
truncated for commands such as Git, LazyGit, and `hunk pager | less`.

Write directly to stdout's file descriptor and keep writing until all bytes are
delivered. Treat EPIPE as a normal early exit when a downstream command stops
reading, such as `hunk pager | head`.
@greptile-apps

greptile-apps Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

PR author is not in the allowed authors list.

@vercel

vercel Bot commented Sep 19, 2026

Copy link
Copy Markdown

@0xferrous is attempting to deploy a commit to the Modem Team on Vercel.

A member of the Team first needs to authorize it.

@benvinegar

Copy link
Copy Markdown
Member

Good find, thank you!

@benvinegar
benvinegar enabled auto-merge (squash) September 23, 2026 16:54
@0xferrous

Copy link
Copy Markdown
Author

failure seems unrelated

This branch has not been deployed

No deployments
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.

2 participants