aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/main.rs')
-rw-r--r--helix-term/src/main.rs14
1 files changed, 6 insertions, 8 deletions
diff --git a/helix-term/src/main.rs b/helix-term/src/main.rs
index 0385d92c..4a3434d1 100644
--- a/helix-term/src/main.rs
+++ b/helix-term/src/main.rs
@@ -88,16 +88,14 @@ FLAGS:
}
if args.health {
- if let Some(lang) = args.health_arg {
- match lang.as_str() {
- "all" => helix_term::health::languages_all(),
- _ => helix_term::health::language(lang),
+ if let Err(err) = helix_term::health::print_health(args.health_arg) {
+ // Piping to for example `head -10` requires special handling:
+ // https://stackoverflow.com/a/65760807/7115678
+ if err.kind() != std::io::ErrorKind::BrokenPipe {
+ return Err(err.into());
}
- } else {
- helix_term::health::general();
- println!();
- helix_term::health::languages_all();
}
+
std::process::exit(0);
}