Skip to content

Commit b65f7fb

Browse files
committed
Fix misleading 'Incorrect password' error on mount failure
Stop matching "Sorry, try again" as a password error — it can appear for unrelated failures (e.g. insufficient VM RAM). Let those cases fall through to sanitize_error() so the real cause is shown. Fixes #48
1 parent 946d8e8 commit b65f7fb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src-tauri/src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ fn execute_with_sudo(args: &[&str], passphrase: Option<&str>, silent: bool) -> R
332332
return Ok(stdout);
333333
} else {
334334
// Check for wrong password or cancelled
335-
if stderr.contains("Sorry, try again") || stderr.contains("incorrect password") {
335+
if stderr.contains("incorrect password") {
336336
return Err("Incorrect password".to_string());
337337
} else if stderr.contains("no askpass program") || stderr.contains("no password was provided") {
338338
return Err("Authentication cancelled".to_string());

0 commit comments

Comments
 (0)