fix(cli): honor update restart overrides
This commit is contained in:
@@ -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)}`));
|
||||
|
||||
Reference in New Issue
Block a user