I found the issue reported by spacefrogg in
https://radicle.zulipchat.com/#narrow/channel/369277-heartwood/topic/Terminal.20output.20handling.20and.20pipes/with/574695784
And figured that this might be a low-hanging fruit (at least the exact error they reported), so I went ahead and fixed it with this patch.
I am not yet sure whether this is “the way to go” for the codebase, but well, it is a proposal. Tell me what you think!
I found the issue reported by spacefrogg in
https://radicle.zulipchat.com/#narrow/channel/369277-heartwood/topic/Terminal.20output.20handling.20and.20pipes/with/574695784
And figured that this might be a low-hanging fruit (at least the exact error they reported), so I went ahead and fixed it with this patch.
I am not yet sure whether this is “the way to go” for the codebase, but well, it is a proposal. Tell me what you think!
Note that I have not yet tested that patch, but I can do that if you want me to.
I like this and it works for me when I try: cargo run --bin rad -- config | head
(The same thing with rad config gives a big red error.)
Systemic Approach to handling SIGPIPE
Working off of the back of the previous revision, this set of changes
attempts to address the SIGPIPE issue across the whole rad CLI.
It first introduces tests to ensure the behaviour is fixed when the
radicle-cli changes are made – removing the ignore from the two
failing tests.
It then avoids the use of println! and print! macros in the
radicle-term crate.
That sets up the changes for radicle-cli to use the radicle-term
functions, denying any print! and println! macros. On top of this,
it adds a backstop handling of SIGPIPE as another panic hook, as well
as handling SIGPIPE at the top-level of run.
The final changes are a renaming refactor to better represent the behaviours of each flavour of print function.
Changes:
- Print panic trace to stderr if debug_assertions is enabled
- Factor out handling of panic into function
Review
Remove unnecessary space.
Changes:
- Accepted lorenz’s REVIEW commits
- Reworded “Handle” commit message
- TODO: understand ade’s test
Nitpicking
Rebase