feat: nicer formatting of errors
This commit is contained in:
parent
c85edebc98
commit
7c4f828c5a
|
@ -26,7 +26,7 @@ fn main() -> std::io::Result<()> {
|
||||||
for target in args.targets.iter() {
|
for target in args.targets.iter() {
|
||||||
if args.no_preserve == false {
|
if args.no_preserve == false {
|
||||||
if target == "/" || target == "~" {
|
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);
|
process::exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ fn main() -> std::io::Result<()> {
|
||||||
let _ = fs::remove_file(target);
|
let _ = fs::remove_file(target);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
println!("{} {} {}", "error:".red().bold(), "the specified target does not exist:", target);
|
println!("{} {} {}", "error:".red().bold(), "the specified target does not exist:", target.yellow());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue