fix: avoid daemon runtime prompt under spinner

main
Ayaan Zaidi 2026-01-27 22:31:48 +05:30 committed by Ayaan Zaidi
parent 4a9c921168
commit 0ad40f4d7c
1 changed files with 14 additions and 11 deletions

View File

@ -66,10 +66,10 @@ export async function maybeInstallDaemon(params: {
if (shouldInstall) { if (shouldInstall) {
let installError: string | null = null; let installError: string | null = null;
await withProgress(
{ label: "Gateway service", indeterminate: true, delayMs: 0 },
async (progress) => {
if (!params.daemonRuntime) { if (!params.daemonRuntime) {
if (GATEWAY_DAEMON_RUNTIME_OPTIONS.length === 1) {
daemonRuntime = GATEWAY_DAEMON_RUNTIME_OPTIONS[0]?.value ?? DEFAULT_GATEWAY_DAEMON_RUNTIME;
} else {
daemonRuntime = guardCancel( daemonRuntime = guardCancel(
await select({ await select({
message: "Gateway service runtime", message: "Gateway service runtime",
@ -79,7 +79,10 @@ export async function maybeInstallDaemon(params: {
params.runtime, params.runtime,
) as GatewayDaemonRuntime; ) as GatewayDaemonRuntime;
} }
}
await withProgress(
{ label: "Gateway service", indeterminate: true, delayMs: 0 },
async (progress) => {
progress.setLabel("Preparing Gateway service…"); progress.setLabel("Preparing Gateway service…");
const cfg = loadConfig(); const cfg = loadConfig();