Skip to content

Commit 71f071e

Browse files
committed
fix: plural conditions
1 parent 511c3f6 commit 71f071e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/alejandra_cli/src/cli.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ pub fn main() -> std::io::Result<()> {
384384
eprintln!(
385385
"Failed! We encountered {} error{} at:",
386386
errors,
387-
if errors > 0 { "s" } else { "" }
387+
if errors >= 2 { "s" } else { "" }
388388
);
389389
for formatted_path in formatted_paths {
390390
if let alejandra_engine::format::Status::Error(error) =
@@ -409,8 +409,8 @@ pub fn main() -> std::io::Result<()> {
409409
eprintln!(
410410
"Success! {} file{} {} changed",
411411
changed,
412-
if changed > 0 { "s" } else { "" },
413-
if changed > 0 { "were" } else { "was" },
412+
if changed >= 2 { "s" } else { "" },
413+
if changed >= 2 { "were" } else { "was" },
414414
);
415415
if check {
416416
std::process::exit(2);

0 commit comments

Comments
 (0)