mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 03:51:25 +00:00
Update: harden control UI asset handling in update flow (#10146)
* Update: harden control UI asset handling in update flow * fix: harden update doctor entrypoint guard (#10146) (thanks @gumadeiras)
This commit is contained in:
committed by
GitHub
parent
50e687d17d
commit
c75275f109
@@ -2,6 +2,10 @@ import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import type { RuntimeEnv } from "../runtime.js";
|
||||
import type { DoctorPrompter } from "./doctor-prompter.js";
|
||||
import {
|
||||
resolveControlUiDistIndexHealth,
|
||||
resolveControlUiDistIndexPathForRoot,
|
||||
} from "../infra/control-ui-assets.js";
|
||||
import { resolveOpenClawPackageRoot } from "../infra/openclaw-root.js";
|
||||
import { runCommandWithTimeout } from "../process/exec.js";
|
||||
import { note } from "../terminal/note.js";
|
||||
@@ -21,7 +25,11 @@ export async function maybeRepairUiProtocolFreshness(
|
||||
}
|
||||
|
||||
const schemaPath = path.join(root, "src/gateway/protocol/schema.ts");
|
||||
const uiIndexPath = path.join(root, "dist/control-ui/index.html");
|
||||
const uiHealth = await resolveControlUiDistIndexHealth({
|
||||
root,
|
||||
argv1: process.argv[1],
|
||||
});
|
||||
const uiIndexPath = uiHealth.indexPath ?? resolveControlUiDistIndexPathForRoot(root);
|
||||
|
||||
try {
|
||||
const [schemaStats, uiStats] = await Promise.all([
|
||||
|
||||
Reference in New Issue
Block a user