Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle BrokenPipe when piping hx --health through head #1876

Merged
merged 2 commits into from
Mar 30, 2022

Conversation

nirmal-j-patel
Copy link
Contributor

Functions in health.rs now return std:io::Result<()>. All instances of println!
and eprintln! have been replaced with writeln!. This allows detection of errors
while printing messages and errors. BrokenPipe errors are ignored. All other
errors are returned.

Fixes #1841

Signed-off-by: Nirmal Patel npate012@gmail.com

Copy link
Member

@dead10ck dead10ck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks!

helix-term/src/health.rs Outdated Show resolved Hide resolved
helix-term/src/main.rs Outdated Show resolved Hide resolved
nirmal-j-patel and others added 2 commits March 30, 2022 10:30
Functions in health.rs now return std:io::Result<()>. All instances of println!
and eprintln! have been replaced with writeln!. This allows detection of errors
while printing messages and errors. BrokenPipe errors are ignored. All other
errors are returned.

Fixes helix-editor#1841

Signed-off-by: Nirmal Patel <npate012@gmail.com>
Copy link
Member

@sudormrfbin sudormrfbin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a conflict, fixed it; thanks @npate012 !

@sudormrfbin sudormrfbin merged commit 8702aaa into helix-editor:master Mar 30, 2022
@nirmal-j-patel nirmal-j-patel deleted the health_handle_pipe branch April 3, 2022 16:20
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.

panic when piping hx --health through head
3 participants