From b9a19d3b6743fe6d22be890a9dbe6eeae947698b Mon Sep 17 00:00:00 2001 From: Muhammad Nauman Raza Date: Thu, 14 Mar 2024 19:47:39 +0000 Subject: [PATCH] feat: nicer formatting of errors --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 162ee8d..a4e8f36 100644 --- a/src/main.rs +++ b/src/main.rs @@ -26,7 +26,7 @@ fn main() -> std::io::Result<()> { for target in args.targets.iter() { if args.no_preserve == false { if target == "/" || target == "~" { - println!("{} you're trying to delete an important directory ({})! specify '--no-preserve-root' if you really want to do this", "error:".red().bold(), target); + println!("{} you're trying to delete an important directory ({})! specify '{}' if you really want to do this", "error:".red().bold(), "--no-preserve".yellow(), target); process::exit(0); } } @@ -38,7 +38,7 @@ fn main() -> std::io::Result<()> { let _ = fs::remove_file(target); } } else { - println!("{} {} {}", "error:".red().bold(), "the specified target does not exist:", target); + println!("{} {} {}", "error:".red().bold(), "the specified target does not exist:", target.yellow()); } }