Skip to content

Commit

Permalink
feat(install_cli: install_prompt): allow "vr" answer as both v and r
Browse files Browse the repository at this point in the history
  • Loading branch information
actionless committed Aug 17, 2024
1 parent a3d36f9 commit 3321418
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pikaur/install_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# pylint: disable=too-many-lines
import contextlib
import hashlib
import itertools
from multiprocessing.pool import ThreadPool
from pathlib import Path
from tempfile import NamedTemporaryFile
Expand Down Expand Up @@ -588,6 +589,16 @@ def _confirm_sysupgrade(
letter = answer.lower()[0]
if letter == translate("y"):
break
if answer in (
"".join(combo)
for combo in itertools.permutations((translate("v"), translate("r")))
):
required_by_installed = not required_by_installed
verbose = not verbose
answer = _confirm_sysupgrade(
verbose=verbose, required_by_installed=required_by_installed,
)
continue
if letter == translate("v"):
verbose = not verbose
answer = _confirm_sysupgrade(
Expand Down

0 comments on commit 3321418

Please sign in to comment.