feat: eprintln! instead of println! with errors
This commit is contained in:
parent
f8233656e7
commit
ceca84b2b3
|
@ -47,8 +47,8 @@ fn vaporise() -> Result<()> {
|
|||
let args = Args::parse();
|
||||
|
||||
if args.targets.is_empty() {
|
||||
println!("{} no arguments passed", "error:".red().bold());
|
||||
println!(
|
||||
eprintln!("{} no arguments passed", "error:".red().bold());
|
||||
eprintln!(
|
||||
"{} try 'vpr -h' for more information",
|
||||
"note:".cyan().bold()
|
||||
);
|
||||
|
@ -78,7 +78,7 @@ fn vaporise() -> Result<()> {
|
|||
.with_context(|| format!("could not remove file: {}", target.bold()))?;
|
||||
}
|
||||
} else {
|
||||
println!(
|
||||
eprintln!(
|
||||
"{} the specified target does not exist: {}",
|
||||
"error:".red().bold(),
|
||||
target.yellow()
|
||||
|
@ -91,6 +91,6 @@ fn vaporise() -> Result<()> {
|
|||
|
||||
fn main() {
|
||||
if let Err(error) = vaporise() {
|
||||
println!("{} {:?}", "error:".red().bold(), error);
|
||||
eprintln!("{} {:?}", "error:".red().bold(), error);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue