-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
panic when piping hx --health
through head
#1841
Comments
@sudormrfbin looks like rather than using |
If anyone wants to take this up, here is an SO post describing the current behavior and how to fix it, and these are the functions where the diagnostics are printed: helix/helix-term/src/health.rs Lines 43 to 219 in bee05dd
The functions will have to return an |
I would like to attempt to fix this. Thanks. |
@npate012 Go for it ! |
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 <[email protected]>
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 <[email protected]>
I have created #1876 for this. I hope it looks good. Thanks. |
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 <[email protected]>
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 <[email protected]>
Summary
Piping
hx --health
throughhead
gives a panic. I'm not sure if it's something to do with my terminal (kitty). Piping throughless
works perfectly, even with colors.Reproduction Steps
Helix log
N/A: no log lines were produced.
But here's the backtrace...
Platform
Linux (NixOS 21.11)
Terminal Emulator
kitty 0.23.1
Helix Version
master at 533cca7
The text was updated successfully, but these errors were encountered: