fix(printer): ignore broken pipe on output streams
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
## Summary
Ignore `BrokenPipeError` when writing to output streams in the printer.
This avoids crashes when output is piped to an early-closing consumer (for example
`head -n1`) and the downstream stream closes before craft-cli finishes writing or
cleaning up the terminal/output state.
## Testing
- `pytest -q tests/unit/test_printer.py -k "broken_pipe" -rs`
- `pytest -q tests/unit/test_printer.py -rs`
- `pytest -q tests/integration/test_messages_integration.py -k "third_party_output" -rs`
- `pytest -q tests/unit/test_messages_stream_cm.py -rs`
- `ruff check craft_cli/printer.py tests/unit/test_printer.py`
Evaluation history
No evaluation history available.