1
Fork 0
mirror of https://github.com/RGBCube/alejandra synced 2025-07-30 12:07:46 +00:00

feat: put ads in stderr and respect --quiet

This commit is contained in:
Kevin Amado 2022-08-06 11:56:35 -06:00
parent 40c2b9d4a2
commit f3b89696b6

View file

@ -194,10 +194,11 @@ pub fn main() -> std::io::Result<()> {
(true, false) => "requires formatting",
}
);
}
if in_place {
println!();
print!("{}", random_ad());
if in_place {
eprintln!();
eprint!("{}", random_ad());
}
}
std::process::exit(if in_place { 0 } else { 2 });
@ -206,8 +207,8 @@ pub fn main() -> std::io::Result<()> {
if !args.quiet {
eprintln!();
eprintln!("Congratulations! Your code complies the Alejandra style.");
println!();
print!("{}", random_ad());
eprintln!();
eprint!("{}", random_ad());
}
std::process::exit(0);