fix(update): preserve post-core host version

(cherry picked from commit e8d8c5dd6f)
This commit is contained in:
Peter Steinberger
2026-05-20 12:56:18 +01:00
parent 3c3ef6067e
commit e57fa51412
2 changed files with 5 additions and 0 deletions

View File

@@ -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 }
: {}),