diff --git a/src/main.rs b/src/main.rs index 4dfcf98..57ddf08 100644 --- a/src/main.rs +++ b/src/main.rs @@ -61,8 +61,7 @@ fn main() { return; } else { last_command = corrected_command; - let msg = execution.err().unwrap(); - error_msg = msg.to_lowercase(); + error_msg = execution.err().unwrap(); let retry_message = format!("{}...", t!("retry")); diff --git a/src/suggestions.rs b/src/suggestions.rs index 74e0fa2..6b7785d 100644 --- a/src/suggestions.rs +++ b/src/suggestions.rs @@ -277,8 +277,8 @@ pub fn confirm_suggestion(shell: &str, command: &str, highlighted: &str) -> Resu .output() .expect("failed to execute process"); let error_msg = match process.stderr.is_empty() { - true => String::from_utf8_lossy(&process.stdout), - false => String::from_utf8_lossy(&process.stderr), + true => String::from_utf8_lossy(&process.stdout).to_lowercase(), + false => String::from_utf8_lossy(&process.stderr).to_lowercase(), }; Err(error_msg.to_string()) }