mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:50:43 +00:00
fix: disable bundled plugins during Parallels update
This commit is contained in:
@@ -679,6 +679,7 @@ function Invoke-OpenClawUpdateWithTimeout {
|
||||
|
||||
$updateJob = Start-Job -ScriptBlock {
|
||||
param([string]$Path, [string]$Target)
|
||||
$env:OPENCLAW_DISABLE_BUNDLED_PLUGINS = '1'
|
||||
$output = & $Path update --tag $Target --yes --json *>&1
|
||||
[pscustomobject]@{
|
||||
ExitCode = $LASTEXITCODE
|
||||
@@ -1431,7 +1432,7 @@ config_path.write_text(json.dumps(config, indent=2) + "\n")
|
||||
PY
|
||||
}
|
||||
stop_openclaw_gateway_processes() {
|
||||
/opt/homebrew/bin/openclaw gateway stop >/dev/null 2>&1 || true
|
||||
OPENCLAW_DISABLE_BUNDLED_PLUGINS=1 /opt/homebrew/bin/openclaw gateway stop >/dev/null 2>&1 || true
|
||||
/usr/bin/pkill -9 -f openclaw-gateway || true
|
||||
/usr/bin/pkill -9 -f 'openclaw gateway run' || true
|
||||
/usr/bin/pkill -9 -f 'openclaw.mjs gateway' || true
|
||||
@@ -1443,7 +1444,7 @@ stop_openclaw_gateway_processes() {
|
||||
# host can observe new plugin metadata mid-update and abort config validation.
|
||||
scrub_future_plugin_entries
|
||||
stop_openclaw_gateway_processes
|
||||
/opt/homebrew/bin/openclaw update --tag "$update_target" --yes --json
|
||||
OPENCLAW_DISABLE_BUNDLED_PLUGINS=1 /opt/homebrew/bin/openclaw update --tag "$update_target" --yes --json
|
||||
# Same-guest npm upgrades can leave the old gateway process holding the old
|
||||
# bundled plugin host version. Stop it before post-update config commands.
|
||||
stop_openclaw_gateway_processes
|
||||
@@ -1555,7 +1556,7 @@ config_path.write_text(json.dumps(config, indent=2) + "\n")
|
||||
PY
|
||||
}
|
||||
stop_openclaw_gateway_processes() {
|
||||
openclaw gateway stop >/dev/null 2>&1 || true
|
||||
OPENCLAW_DISABLE_BUNDLED_PLUGINS=1 openclaw gateway stop >/dev/null 2>&1 || true
|
||||
pkill -9 -f openclaw-gateway || true
|
||||
pkill -9 -f 'openclaw gateway run' || true
|
||||
pkill -9 -f 'openclaw.mjs gateway' || true
|
||||
@@ -1572,7 +1573,7 @@ stop_openclaw_gateway_processes() {
|
||||
# the old host can observe new plugin metadata mid-update and abort validation.
|
||||
scrub_future_plugin_entries
|
||||
stop_openclaw_gateway_processes
|
||||
openclaw update --tag "$update_target" --yes --json
|
||||
OPENCLAW_DISABLE_BUNDLED_PLUGINS=1 openclaw update --tag "$update_target" --yes --json
|
||||
# The fresh Linux lane starts a manual gateway; stop the old process before
|
||||
# post-update config validation sees mixed old-host/new-plugin metadata.
|
||||
stop_openclaw_gateway_processes
|
||||
|
||||
@@ -20,5 +20,10 @@ describe("parallels npm update smoke", () => {
|
||||
expect(script).toContain('"feishu", "whatsapp"');
|
||||
expect(script).toContain("Remove-FuturePluginEntries\n Stop-OpenClawGatewayProcesses");
|
||||
expect(script).toContain("scrub_future_plugin_entries\nstop_openclaw_gateway_processes");
|
||||
expect(script).toContain("$env:OPENCLAW_DISABLE_BUNDLED_PLUGINS = '1'");
|
||||
expect(script).toContain(
|
||||
"OPENCLAW_DISABLE_BUNDLED_PLUGINS=1 /opt/homebrew/bin/openclaw update",
|
||||
);
|
||||
expect(script).toContain("OPENCLAW_DISABLE_BUNDLED_PLUGINS=1 openclaw update");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user