@@ -21,7 +21,7 @@ import { GATEWAY_SERVICE_RUNTIME_PID_ENV } from "../daemon/constants.js";
|
21 | 21 | import { resolveGatewayInstallEntrypoint } from "../daemon/gateway-entrypoint.js"; |
22 | 22 | import { runCommandWithTimeout } from "../process/exec.js"; |
23 | 23 | import { resolveStableNodePath } from "./stable-node-path.js"; |
24 | | -import { DEFAULT_GIT_CHANNEL, type UpdateChannel } from "./update-channels.js"; |
| 24 | +import type { UpdateChannel } from "./update-channels.js"; |
25 | 25 | import type { UpdateRunResult } from "./update-runner.js"; |
26 | 26 | |
27 | 27 | // Whole-process backstop for the finalizer. `update finalize` runs several timed |
@@ -158,16 +158,17 @@ export async function runPostCoreFinalizeAfterGatewayUpdate(params: {
|
158 | 158 | typeof params.timeoutMs === "number" && Number.isFinite(params.timeoutMs) |
159 | 159 | ? params.timeoutMs |
160 | 160 | : undefined; |
161 | | -// This helper only runs for git/source updates, where `runGatewayUpdate` |
162 | | -// defaults the core update to the git/dev channel (`opts.channel ?? "dev"`). |
163 | | -// Match it so the finalizer converges official plugins on the same channel as |
164 | | -// the core update instead of falling back to the package (stable) channel. |
165 | | -const channel = params.channel ?? DEFAULT_GIT_CHANNEL; |
| 161 | +// Only forward `--channel` when the caller actually has a configured channel. |
| 162 | +// `update finalize` treats any `--channel` as an explicit request and persists |
| 163 | +// it to `openclaw.json` (`persistRequestedUpdateChannel`); emitting a defaulted |
| 164 | +// channel here would write a channel the user never requested. When omitted, |
| 165 | +// the finalizer converges on the stored/default channel — the reconcile still |
| 166 | +// resolves a host-compatible version, it just does not mutate config. |
166 | 167 | const nodePath = await resolveStableNodePath(process.execPath); |
167 | 168 | const argv = buildFinalizeArgv({ |
168 | 169 | nodePath, |
169 | 170 | entrypoint, |
170 | | - channel, |
| 171 | +...(params.channel ? { channel: params.channel } : {}), |
171 | 172 | ...(perStepTimeoutMs === undefined ? {} : { timeoutMs: perStepTimeoutMs }), |
172 | 173 | }); |
173 | 174 | // Pin the finalizer's host-compat resolution to the just-installed core |
|