fix: strip rich markup from questionary choices

This commit is contained in:
2026-08-27 20:27:58 +02:00
parent a7f3008cf5
commit d7ff75f908
+4 -5
View File
@@ -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: