From 0e59e0b87a005a87bea98ab82e42745b5675cf88 Mon Sep 17 00:00:00 2001 From: "Manu [tennox]" Date: Tue, 7 May 2024 19:39:03 +0100 Subject: [PATCH] Fix diagnostics exit code help text Issue #129 Alternative PR to #135 --- crates/nil/src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/nil/src/main.rs b/crates/nil/src/main.rs index eb52b45..d9a0554 100644 --- a/crates/nil/src/main.rs +++ b/crates/nil/src/main.rs @@ -40,8 +40,9 @@ enum Subcommand { #[derive(Debug, FromArgs)] #[argh(subcommand, name = "diagnostics")] /// Check and print diagnostics for a file. -/// Exit with non-zero code if there are any diagnostics. (`1` for errors, `2` if only warnings) -/// WARNING: The output format is for human and should not be relied on. +/// Output will be empty if there are no errors/warnigns. +/// Exit with non-zero code if there are any errors. (`0` for only warnings) +/// WARNING: The output format is for humans and should not be relied on. struct DiagnosticsArgs { /// nix file to check, or read from stdin for `-`. /// NB. You need `--` before `-` for paths starting with `-`,