chore: enable consistent-return

This commit is contained in:
Peter Steinberger
2026-04-10 20:56:08 +01:00
parent bc27278d6d
commit 0ebeee8b0d
68 changed files with 223 additions and 107 deletions

View File

@@ -205,7 +205,7 @@ export async function runDaemonRestart(opts: DaemonLifecycleOptions = {}): Promi
delayMs: POST_RESTART_HEALTH_DELAY_MS,
});
if (health.healthy) {
return;
return undefined;
}
const diagnostics = renderGatewayPortHealthDiagnostics(health);
@@ -224,6 +224,7 @@ export async function runDaemonRestart(opts: DaemonLifecycleOptions = {}): Promi
formatCliCommand("openclaw gateway status --deep"),
formatCliCommand("openclaw doctor"),
]);
throw new Error("unreachable after gateway restart health failure");
}
let health = await waitForGatewayHealthyRestart({
@@ -257,7 +258,7 @@ export async function runDaemonRestart(opts: DaemonLifecycleOptions = {}): Promi
}
if (health.healthy) {
return;
return undefined;
}
const diagnostics = renderRestartDiagnostics(health);
@@ -290,6 +291,7 @@ export async function runDaemonRestart(opts: DaemonLifecycleOptions = {}): Promi
formatCliCommand("openclaw gateway status --deep"),
formatCliCommand("openclaw doctor"),
]);
throw new Error("unreachable after gateway restart failure");
},
});
}