From d7ff75f908a7c2dd63afc057edfa580c8d1c576f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82?= Date: Thu, 27 Aug 2026 20:27:58 +0200 Subject: [PATCH] fix: strip rich markup from questionary choices --- euri_mklive/tui.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/euri_mklive/tui.py b/euri_mklive/tui.py index a88c111..b87c5b5 100644 --- a/euri_mklive/tui.py +++ b/euri_mklive/tui.py @@ -107,15 +107,14 @@ def select_mode() -> str: choice = questionary.select( "Select mode:", choices=[ - "[yellow]fakeroot — no root needed, degraded perf[/]", - "[cyan]root — enter sudo password to continue as root[/]", + "fakeroot -- no root needed, degraded perf", + "root -- enter sudo password to continue as root", ], - default="[yellow]fakeroot — no root needed, degraded perf[/]", + default="fakeroot -- no root needed, degraded perf", ).ask() if choice is None: sys.exit(0) - if "root" in choice: - import subprocess + if choice.startswith("root"): console.print("\n[bold]Entering root mode...[/]") ret = subprocess.run(["sudo", "true"], capture_output=True) if ret.returncode != 0: