mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
fix(parallels): preserve plugin inventory during updates (#122912)
* fix(parallels): preserve plugin inventory during updates * fix(parallels): preserve dev update plugin inventory
This commit is contained in:
@@ -970,7 +970,7 @@ config.update = { ...(config.update || {}), channel: "dev" };
|
||||
fs.mkdirSync(path.dirname(configPath), { recursive: true });
|
||||
fs.writeFileSync(configPath, JSON.stringify(config, null, 2) + "\\n");
|
||||
JS
|
||||
/usr/bin/env NODE_OPTIONS=--max-old-space-size=8192 OPENCLAW_ALLOW_OLDER_BINARY_DESTRUCTIVE_ACTIONS=1 OPENCLAW_DISABLE_BUNDLED_PLUGINS=1${devTargetEnv} ${guestOpenClawEntryRunner} update --channel dev --yes --json --no-restart --timeout ${this.updateDevTimeoutSeconds}
|
||||
/usr/bin/env NODE_OPTIONS=--max-old-space-size=8192 OPENCLAW_ALLOW_OLDER_BINARY_DESTRUCTIVE_ACTIONS=1${devTargetEnv} ${guestOpenClawEntryRunner} update --channel dev --yes --json --no-restart --timeout ${this.updateDevTimeoutSeconds}
|
||||
${guestOpenClawEntryRunner} --version
|
||||
${guestOpenClawEntryRunner} update status --json`,
|
||||
{},
|
||||
|
||||
@@ -142,12 +142,12 @@ if [ "$agent_ok" != true ]; then
|
||||
fi`;
|
||||
}
|
||||
|
||||
function windowsUpdateWithBundledPluginsDisabled(input: NpmUpdateScriptInput): string {
|
||||
function windowsUpdateWithScopedEnv(input: NpmUpdateScriptInput): string {
|
||||
const registryEntry = input.npmRegistry
|
||||
? `; NPM_CONFIG_REGISTRY = ${psSingleQuote(input.npmRegistry)}`
|
||||
: "";
|
||||
return `$script:OpenClawUpdateExit = 0
|
||||
$updateOutput = Invoke-WithScopedEnv @{ OPENCLAW_DISABLE_BUNDLED_PLUGINS = '1'; OPENCLAW_ALLOW_OLDER_BINARY_DESTRUCTIVE_ACTIONS = '1'${registryEntry} } {
|
||||
$updateOutput = Invoke-WithScopedEnv @{ OPENCLAW_ALLOW_OLDER_BINARY_DESTRUCTIVE_ACTIONS = '1'${registryEntry} } {
|
||||
Invoke-OpenClaw update --tag ${psSingleQuote(input.updateTarget)} --yes --json --no-restart 2>&1
|
||||
$script:OpenClawUpdateExit = $LASTEXITCODE
|
||||
}
|
||||
@@ -285,7 +285,7 @@ wait_for_gateway() {
|
||||
}
|
||||
scrub_future_plugin_entries
|
||||
stop_openclaw_gateway_processes
|
||||
${posixNpmRegistryEnv(input.npmRegistry)}OPENCLAW_ALLOW_OLDER_BINARY_DESTRUCTIVE_ACTIONS=1 OPENCLAW_DISABLE_BUNDLED_PLUGINS=1 "$OPENCLAW_BIN" update --tag ${shellQuote(input.updateTarget)} --yes --json --no-restart
|
||||
${posixNpmRegistryEnv(input.npmRegistry)}OPENCLAW_ALLOW_OLDER_BINARY_DESTRUCTIVE_ACTIONS=1 "$OPENCLAW_BIN" update --tag ${shellQuote(input.updateTarget)} --yes --json --no-restart
|
||||
${posixVersionCheck(macosOpenClawCommand, input.expectedNeedle)}
|
||||
start_openclaw_gateway
|
||||
wait_for_gateway
|
||||
@@ -360,7 +360,7 @@ function Stop-OpenClawGatewayProcesses {
|
||||
}
|
||||
Remove-FuturePluginEntries
|
||||
Stop-OpenClawGatewayProcesses
|
||||
${windowsUpdateWithBundledPluginsDisabled(input)}
|
||||
${windowsUpdateWithScopedEnv(input)}
|
||||
if ($updateExit -ne 0) {
|
||||
$updateText = $updateOutput | Out-String
|
||||
$stalePostSwapImport = $updateText -match 'ERR_MODULE_NOT_FOUND' -and $updateText -match ${psSingleQuote(windowsStalePostSwapImportRegex)}
|
||||
@@ -429,7 +429,7 @@ wait_for_gateway() {
|
||||
}
|
||||
scrub_future_plugin_entries
|
||||
stop_openclaw_gateway_processes
|
||||
${posixNpmRegistryEnv(input.npmRegistry)}OPENCLAW_ALLOW_OLDER_BINARY_DESTRUCTIVE_ACTIONS=1 OPENCLAW_DISABLE_BUNDLED_PLUGINS=1 openclaw update --tag ${shellQuote(input.updateTarget)} --yes --json --no-restart
|
||||
${posixNpmRegistryEnv(input.npmRegistry)}OPENCLAW_ALLOW_OLDER_BINARY_DESTRUCTIVE_ACTIONS=1 openclaw update --tag ${shellQuote(input.updateTarget)} --yes --json --no-restart
|
||||
${posixVersionCheck("openclaw", input.expectedNeedle)}
|
||||
start_openclaw_gateway
|
||||
wait_for_gateway
|
||||
|
||||
@@ -687,7 +687,7 @@ $config.update | Add-Member -Force -MemberType NoteProperty -Name channel -Value
|
||||
$config | ConvertTo-Json -Depth 100 | Set-Content -Path $configPath -Encoding utf8
|
||||
${windowsScopedEnvFunction}
|
||||
$script:OpenClawUpdateExit = 0
|
||||
Invoke-WithScopedEnv @{ OPENCLAW_ALLOW_OLDER_BINARY_DESTRUCTIVE_ACTIONS = '1'; OPENCLAW_DISABLE_BUNDLED_PLUGINS = '1'${devTargetEntry} } {
|
||||
Invoke-WithScopedEnv @{ OPENCLAW_ALLOW_OLDER_BINARY_DESTRUCTIVE_ACTIONS = '1'${devTargetEntry} } {
|
||||
Invoke-OpenClaw update --channel dev --yes --json --no-restart --timeout ${this.updateTimeoutSeconds}
|
||||
$script:OpenClawUpdateExit = $LASTEXITCODE
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user