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:
parent
40c2b9d4a2
commit
f3b89696b6
1 changed files with 7 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue