mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 09:17:38 +00:00
fix(update): honor update.channel for update.run
This commit is contained in:
@@ -3,7 +3,14 @@ import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { type CommandOptions, runCommandWithTimeout } from "../process/exec.js";
|
||||
import { trimLogTail } from "./restart-sentinel.js";
|
||||
import { DEV_BRANCH, isBetaTag, isStableTag, type UpdateChannel } from "./update-channels.js";
|
||||
import {
|
||||
channelToNpmTag,
|
||||
DEFAULT_PACKAGE_CHANNEL,
|
||||
DEV_BRANCH,
|
||||
isBetaTag,
|
||||
isStableTag,
|
||||
type UpdateChannel,
|
||||
} from "./update-channels.js";
|
||||
import { compareSemverStrings } from "./update-check.js";
|
||||
import {
|
||||
cleanupGlobalRenameDirs,
|
||||
@@ -800,7 +807,9 @@ export async function runGatewayUpdate(opts: UpdateRunnerOptions = {}): Promise<
|
||||
globalRoot: path.dirname(pkgRoot),
|
||||
packageName,
|
||||
});
|
||||
const spec = `${packageName}@${normalizeTag(opts.tag)}`;
|
||||
const channel = opts.channel ?? DEFAULT_PACKAGE_CHANNEL;
|
||||
const tag = normalizeTag(opts.tag ?? channelToNpmTag(channel));
|
||||
const spec = `${packageName}@${tag}`;
|
||||
const updateStep = await runStep({
|
||||
runCommand,
|
||||
name: "global update",
|
||||
|
||||
Reference in New Issue
Block a user