Skip to content

Broken Pipe error when piping a long diff to less and quitting #15

Description

@nmay231

To reproduce: get a very long diff, pipe the output of dunk to less or another pager, and quit without reading the entire thing.

python -c "print('line\n' * 1000)" > tmp
git add tmp
git diff HEAD | dunk | less -R  # Exit pager without scrolling

# ...
# BrokenPipeError: [Errno 32] Broken pipe

The desired behavior would be to either 1) completely ignore broken pipe errors or 2) catch broken pipe errors and print a one-liner to stderr. I would much prefer the first one.

Thank you so much for the project btw 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions