Skip to content

Handle broken output pipes without panicking #91

Closed

Description

@LunaStev

Problem

CLI output is written through println! and eprintln!, which can panic when a downstream consumer closes a pipe early. Commands such as tree, metadata, help, or info should behave like normal Unix tools when piped through head.

Acceptance criteria

  • Treat stdout broken-pipe errors as normal early termination.
  • Do not print a Rust panic or backtrace.
  • Keep genuine stderr write failures diagnosable where possible.
  • Apply one output abstraction to all commands and machine-readable modes.
  • Define Windows pipe behavior.
  • Add process tests that close stdout and stderr consumers early.

Activity

  1. added
    bug
    cross-platform
    ui/ux
    stability
    on Sep 18, 2026
  2. self-assigned this
    on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugcross-platformstabilityui/ux

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions