From 486f92d0a36d76d899d0451cb9c752c116cec8c7 Mon Sep 17 00:00:00 2001 From: Joongi Kim Date: Tue, 12 May 2026 19:05:45 +0900 Subject: [PATCH] fix: auto-proceed installer warnings in headless mode `SetupLog.wait_continue()` previously blocked on an asyncio Event that could only be set by the Textual `enter` key binding. When the installer runs with `--headless`, Textual has no terminal-attached UI to receive keystrokes, so the WSL/LiveCD environment warning prompt would hang forever waiting for an Enter press that never arrives. Detect headless mode and auto-continue after printing the warning so `./backend.ai install --headless --non-interactive ...` proceeds without human input. --- changes/11564.fix.md | 1 + src/ai/backend/install/widgets.py | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 changes/11564.fix.md diff --git a/changes/11564.fix.md b/changes/11564.fix.md new file mode 100644 index 00000000000..f528deff836 --- /dev/null +++ b/changes/11564.fix.md @@ -0,0 +1 @@ +Fix the installer hanging on the WSL/LiveCD environment warning when run with `--headless` because the "Press Enter to continue" prompt could not receive keystrokes; in headless mode it now auto-proceeds after printing the warning. diff --git a/src/ai/backend/install/widgets.py b/src/ai/backend/install/widgets.py index 65bd5662cd3..1dae0de379d 100644 --- a/src/ai/backend/install/widgets.py +++ b/src/ai/backend/install/widgets.py @@ -97,7 +97,12 @@ async def wait_continue(self) -> None: """ Block until the user concludes the dialog. If the user cancels, the result will be None. + In headless mode there is no terminal-attached UI to receive the Enter + keypress, so we auto-proceed instead of blocking forever. """ + if self.app.is_headless: + self.write(Text.from_markup("\n[dim](headless mode: auto-continuing)[/]\n")) + return self.write(Text.from_markup("\nPress [bold]Enter[/] to continue...\n")) self._continue.clear() await self._continue.wait()