From 71f071e857918b849e7f997721a5ec22ae4ea1e0 Mon Sep 17 00:00:00 2001 From: Kevin Amado Date: Tue, 8 Mar 2022 17:39:05 -0500 Subject: [PATCH] fix: plural conditions --- src/alejandra_cli/src/cli.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/alejandra_cli/src/cli.rs b/src/alejandra_cli/src/cli.rs index d6639c0..d2f33b8 100644 --- a/src/alejandra_cli/src/cli.rs +++ b/src/alejandra_cli/src/cli.rs @@ -384,7 +384,7 @@ pub fn main() -> std::io::Result<()> { eprintln!( "Failed! We encountered {} error{} at:", errors, - if errors > 0 { "s" } else { "" } + if errors >= 2 { "s" } else { "" } ); for formatted_path in formatted_paths { if let alejandra_engine::format::Status::Error(error) = @@ -409,8 +409,8 @@ pub fn main() -> std::io::Result<()> { eprintln!( "Success! {} file{} {} changed", changed, - if changed > 0 { "s" } else { "" }, - if changed > 0 { "were" } else { "was" }, + if changed >= 2 { "s" } else { "" }, + if changed >= 2 { "were" } else { "was" }, ); if check { std::process::exit(2);