fix: not output when sucessfully executed the command

This commit is contained in:
iff 2023-08-09 16:50:45 +02:00
parent 6a1b7fb246
commit a201c18c01
2 changed files with 10 additions and 5 deletions

View file

@ -46,11 +46,15 @@ fn main() {
if execution.is_ok() {
return;
} else {
last_command = corrected_command;
let msg = execution.err().unwrap();
error_msg = msg.to_lowercase();
let retry_message =
format!("{}", "Looking for new suggestion...".cyan().bold());
println!("\n{} {}", "ERROR:".red().bold(), msg);
println!("\n{}\n", retry_message);
last_command = corrected_command;
error_msg = execution.err().unwrap();
}
} else {
break;