mirror of
https://github.com/RGBCube/alejandra
synced 2025-07-30 12:07:46 +00:00
fix: plural conditions
This commit is contained in:
parent
511c3f6a88
commit
71f071e857
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue