mirror of
https://github.com/RGBCube/alejandra
synced 2025-07-31 12:37:45 +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",
|
(true, false) => "requires formatting",
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
|
||||||
if in_place {
|
if in_place {
|
||||||
println!();
|
eprintln!();
|
||||||
print!("{}", random_ad());
|
eprint!("{}", random_ad());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::process::exit(if in_place { 0 } else { 2 });
|
std::process::exit(if in_place { 0 } else { 2 });
|
||||||
|
@ -206,8 +207,8 @@ pub fn main() -> std::io::Result<()> {
|
||||||
if !args.quiet {
|
if !args.quiet {
|
||||||
eprintln!();
|
eprintln!();
|
||||||
eprintln!("Congratulations! Your code complies the Alejandra style.");
|
eprintln!("Congratulations! Your code complies the Alejandra style.");
|
||||||
println!();
|
eprintln!();
|
||||||
print!("{}", random_ad());
|
eprint!("{}", random_ad());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::process::exit(0);
|
std::process::exit(0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue