ui: attach gum confirm to /dev/tty so it doesn't render through the install log tee

This commit is contained in:
Ryan Hughes committed 2026-05-21 20:08:38 -04:00
1 parent 260edc13c5
commit 21dbbcb917
1 file changed
+2 -1
@@ -18,7 +18,8 @@ def style(text: str, *, foreground: str | None = None, padding: str | None = Non
def confirm(prompt: str, *, default: bool = True) -> bool:
cmd = ["gum", "confirm", "--default" if default else "--no-default", prompt]
return subprocess.run(cmd).returncode == 0
with open("/dev/tty", "rb") as stdin, open("/dev/tty", "wb") as stdout:
return subprocess.run(cmd, stdin=stdin, stdout=stdout, stderr=stdout).returncode == 0
def info(text: str) -> None: