mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 13:11:22 +00:00
fix(update): honor update.channel for update.run
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { GatewayRequestHandlers } from "./types.js";
|
||||
import { loadConfig } from "../../config/config.js";
|
||||
import { resolveOpenClawPackageRoot } from "../../infra/openclaw-root.js";
|
||||
import {
|
||||
formatDoctorNonInteractiveHint,
|
||||
@@ -6,6 +7,7 @@ import {
|
||||
writeRestartSentinel,
|
||||
} from "../../infra/restart-sentinel.js";
|
||||
import { scheduleGatewaySigusr1Restart } from "../../infra/restart.js";
|
||||
import { normalizeUpdateChannel } from "../../infra/update-channels.js";
|
||||
import { runGatewayUpdate } from "../../infra/update-runner.js";
|
||||
import {
|
||||
ErrorCodes,
|
||||
@@ -48,6 +50,8 @@ export const updateHandlers: GatewayRequestHandlers = {
|
||||
|
||||
let result: Awaited<ReturnType<typeof runGatewayUpdate>>;
|
||||
try {
|
||||
const config = loadConfig();
|
||||
const configChannel = normalizeUpdateChannel(config.update?.channel);
|
||||
const root =
|
||||
(await resolveOpenClawPackageRoot({
|
||||
moduleUrl: import.meta.url,
|
||||
@@ -58,6 +62,7 @@ export const updateHandlers: GatewayRequestHandlers = {
|
||||
timeoutMs,
|
||||
cwd: root,
|
||||
argv1: process.argv[1],
|
||||
channel: configChannel ?? undefined,
|
||||
});
|
||||
} catch (err) {
|
||||
result = {
|
||||
|
||||
Reference in New Issue
Block a user