refactor: consistence

This commit is contained in:
iff 2024-09-26 02:26:40 +02:00
parent 754214ede3
commit 7aa1aeafff
2 changed files with 3 additions and 4 deletions

View file

@ -61,8 +61,7 @@ fn main() {
return; return;
} else { } else {
last_command = corrected_command; last_command = corrected_command;
let msg = execution.err().unwrap(); error_msg = execution.err().unwrap();
error_msg = msg.to_lowercase();
let retry_message = format!("{}...", t!("retry")); let retry_message = format!("{}...", t!("retry"));

View file

@ -277,8 +277,8 @@ pub fn confirm_suggestion(shell: &str, command: &str, highlighted: &str) -> Resu
.output() .output()
.expect("failed to execute process"); .expect("failed to execute process");
let error_msg = match process.stderr.is_empty() { let error_msg = match process.stderr.is_empty() {
true => String::from_utf8_lossy(&process.stdout), true => String::from_utf8_lossy(&process.stdout).to_lowercase(),
false => String::from_utf8_lossy(&process.stderr), false => String::from_utf8_lossy(&process.stderr).to_lowercase(),
}; };
Err(error_msg.to_string()) Err(error_msg.to_string())
} }