mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-12 14:30:10 +01:00
refactor: consistence
This commit is contained in:
parent
754214ede3
commit
7aa1aeafff
2 changed files with 3 additions and 4 deletions
|
|
@ -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"));
|
||||
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue