From 0ad40f4d7cecb81115f933be122e9331fbb6b619 Mon Sep 17 00:00:00 2001 From: Ayaan Zaidi Date: Tue, 27 Jan 2026 22:31:48 +0530 Subject: [PATCH] fix: avoid daemon runtime prompt under spinner --- src/commands/configure.daemon.ts | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/commands/configure.daemon.ts b/src/commands/configure.daemon.ts index 38d8365c09..c0431c9f10 100644 --- a/src/commands/configure.daemon.ts +++ b/src/commands/configure.daemon.ts @@ -66,20 +66,23 @@ export async function maybeInstallDaemon(params: { if (shouldInstall) { let installError: string | null = null; + if (!params.daemonRuntime) { + if (GATEWAY_DAEMON_RUNTIME_OPTIONS.length === 1) { + daemonRuntime = GATEWAY_DAEMON_RUNTIME_OPTIONS[0]?.value ?? DEFAULT_GATEWAY_DAEMON_RUNTIME; + } else { + daemonRuntime = guardCancel( + await select({ + message: "Gateway service runtime", + options: GATEWAY_DAEMON_RUNTIME_OPTIONS, + initialValue: DEFAULT_GATEWAY_DAEMON_RUNTIME, + }), + params.runtime, + ) as GatewayDaemonRuntime; + } + } await withProgress( { label: "Gateway service", indeterminate: true, delayMs: 0 }, async (progress) => { - if (!params.daemonRuntime) { - daemonRuntime = guardCancel( - await select({ - message: "Gateway service runtime", - options: GATEWAY_DAEMON_RUNTIME_OPTIONS, - initialValue: DEFAULT_GATEWAY_DAEMON_RUNTIME, - }), - params.runtime, - ) as GatewayDaemonRuntime; - } - progress.setLabel("Preparing Gateway service…"); const cfg = loadConfig();