Skip to content

Commit

Permalink
In noconfirm mode, default to n on sudo retry prompt.
Browse files Browse the repository at this point in the history
Otherwise, when there are package conflicts, it would lead to an infinite loop.
  • Loading branch information
trizen committed Jul 31, 2020
1 parent cc90b17 commit ad0d2a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trizen
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ sub execute_pacman_command ($needs_root, @cmd) {
}

note(":: Exit code: " . exit_code()) if $lconfig{debug};
$term->ask_yn(prompt => "$c{bold}=>> Try again?$c{reset}", default => 'y') and redo;
$term->ask_yn(prompt => "$c{bold}=>> Try again?$c{reset}", default => ($lconfig{noconfirm} ? 'n' : 'y')) and redo;
}
}

Expand Down

0 comments on commit ad0d2a2

Please sign in to comment.