fix: avoid daemon runtime prompt under spinner
This commit is contained in:
parent
4a9c921168
commit
0ad40f4d7c
@ -66,20 +66,23 @@ export async function maybeInstallDaemon(params: {
|
|||||||
|
|
||||||
if (shouldInstall) {
|
if (shouldInstall) {
|
||||||
let installError: string | null = null;
|
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(
|
await withProgress(
|
||||||
{ label: "Gateway service", indeterminate: true, delayMs: 0 },
|
{ label: "Gateway service", indeterminate: true, delayMs: 0 },
|
||||||
async (progress) => {
|
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…");
|
progress.setLabel("Preparing Gateway service…");
|
||||||
|
|
||||||
const cfg = loadConfig();
|
const cfg = loadConfig();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user