mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 12:56:01 -06:00
fix(update): preserve post-core host version
(cherry picked from commit e8d8c5dd6f)
This commit is contained in:
@@ -824,6 +824,7 @@ describe("update-cli", () => {
|
||||
expect(call?.[2]?.env?.NODE_DISABLE_COMPILE_CACHE).toBe("1");
|
||||
expect(call?.[2]?.env?.OPENCLAW_UPDATE_POST_CORE).toBe("1");
|
||||
expect(call?.[2]?.env?.OPENCLAW_UPDATE_POST_CORE_CHANNEL).toBe("dev");
|
||||
expect(call?.[2]?.env?.OPENCLAW_COMPATIBILITY_HOST_VERSION).toBe("1.0.0");
|
||||
expect(updateNpmInstalledPlugins).not.toHaveBeenCalled();
|
||||
expect(runDaemonInstall).not.toHaveBeenCalled();
|
||||
expect(runDaemonRestart).not.toHaveBeenCalled();
|
||||
|
||||
@@ -2678,6 +2678,7 @@ async function continuePostCoreUpdateInFreshProcess(params: {
|
||||
const resultPath = path.join(resultDir, "plugins.json");
|
||||
const installRecordsPath = path.join(resultDir, "plugin-install-records.json");
|
||||
const sourceConfigPath = path.join(resultDir, "source-config.json");
|
||||
const postCoreHostVersion = await readPackageVersion(params.root);
|
||||
|
||||
try {
|
||||
await writePostCorePluginInstallRecordsFile(installRecordsPath, params.pluginInstallRecords);
|
||||
@@ -2695,6 +2696,9 @@ async function continuePostCoreUpdateInFreshProcess(params: {
|
||||
[POST_CORE_UPDATE_RESULT_PATH_ENV]: resultPath,
|
||||
[POST_CORE_UPDATE_INSTALL_RECORDS_PATH_ENV]: installRecordsPath,
|
||||
[POST_CORE_UPDATE_STARTED_AT_ENV]: String(params.updateStartedAtMs),
|
||||
...(postCoreHostVersion === null
|
||||
? {}
|
||||
: { OPENCLAW_COMPATIBILITY_HOST_VERSION: postCoreHostVersion }),
|
||||
...(params.preUpdateConfig
|
||||
? { [POST_CORE_UPDATE_SOURCE_CONFIG_PATH_ENV]: sourceConfigPath }
|
||||
: {}),
|
||||
|
||||
Reference in New Issue
Block a user