fix(cli): honor update restart overrides

This commit is contained in:
Sebastian
2026-02-17 08:46:59 -05:00
parent dff8692613
commit 366da7569a
4 changed files with 93 additions and 5 deletions

View File

@@ -400,9 +400,10 @@ async function maybeRestartService(params: {
try {
let restarted = false;
let restartInitiated = false;
if (params.restartScriptPath) {
await runRestartScript(params.restartScriptPath);
restarted = true;
restartInitiated = true;
} else {
restarted = await runDaemonRestart();
}
@@ -423,6 +424,16 @@ async function maybeRestartService(params: {
delete process.env.OPENCLAW_UPDATE_IN_PROGRESS;
}
}
if (!params.opts.json && restartInitiated) {
defaultRuntime.log(theme.success("Daemon restart initiated."));
defaultRuntime.log(
theme.muted(
`Verify with \`${replaceCliName(formatCliCommand("openclaw gateway status"), CLI_NAME)}\` once the gateway is back.`,
),
);
defaultRuntime.log("");
}
} catch (err) {
if (!params.opts.json) {
defaultRuntime.log(theme.warn(`Daemon restart failed: ${String(err)}`));