-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Bug Description
The openclaw-memory-plugin installation process overwrites existing plugins.allow and plugins.load.paths configuration instead of appending to them, causing previously installed plugins to be lost.
Steps to Reproduce
- Install any existing openclaw plugin so that
plugins.allowandplugins.load.pathsalready have entries - Run the openclaw-memory-plugin installer (either via
install.shorsetup-helper/cli.js) - Inspect the config — previously registered plugins are gone
Expected Behavior
The installer should read the existing plugin list and append the new plugin entry, preserving all previously configured plugins.
Actual Behavior
The existing plugin list is overwritten with an array containing only the newly installed plugin. Three separate code paths have this issue:
setup-helper/cli.js:531— Directly overwritesplugins.load.pathswith[pluginPath](single-element array), discarding all existing paths.setup-helper/cli.js:536-542— Reads existingplugins.allowviarun()but accessesraw.stdoutincorrectly (likelyundefined), falls back to[], effectively wiping the allow list.install.sh:612-629— Usessedto manipulate JSON arrays, which is unreliable and can produce malformed JSON in edge cases (special characters, empty arrays, multiline content).
Minimal Reproducible Example
// cli.js line 531 — this overwrites instead of appending:
await runNoShell("openclaw", ["config", "set", "plugins.load.paths", JSON.stringify([pluginPath])], { silent: true }).catch(() => {});
// Should be (read-then-append), similar to the correct pattern at lines 491-493:
// const paths = Array.isArray(existing) ? existing : [];
// if (!paths.includes(pluginPath)) paths.push(pluginPath);
// then set plugins.load.paths to the merged arrayError Logs
No error logs — the overwrite happens silently.
OpenViking Version
latest (main branch)
Python Version
N/A (TypeScript/Bash code)
Operating System
All (Linux, macOS, Windows)
Additional Context
The JSON-mode code path (cli.js:485-493) already implements the correct read-then-append pattern and can serve as a reference for fixing the other code paths.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status