feat/proxy-pcexec #14
15
install.mjs
15
install.mjs
@@ -343,12 +343,21 @@ async function configure() {
|
|||||||
|
|
||||||
const plugins = getOpenclawConfig('plugins', {});
|
const plugins = getOpenclawConfig('plugins', {});
|
||||||
plugins.entries = plugins.entries || {};
|
plugins.entries = plugins.entries || {};
|
||||||
|
|
||||||
|
const existingEntry = plugins.entries[PLUGIN_NAME] || {};
|
||||||
|
const existingConfig = existingEntry.config || {};
|
||||||
|
const defaultConfig = { enabled: true, secretMgrPath, openclawProfilePath: openclawPath };
|
||||||
|
|
||||||
plugins.entries[PLUGIN_NAME] = {
|
plugins.entries[PLUGIN_NAME] = {
|
||||||
enabled: true,
|
...existingEntry,
|
||||||
config: { enabled: true, secretMgrPath, openclawProfilePath: openclawPath },
|
enabled: existingEntry.enabled ?? true,
|
||||||
|
config: {
|
||||||
|
...defaultConfig,
|
||||||
|
...existingConfig,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
setOpenclawConfig('plugins', plugins);
|
setOpenclawConfig('plugins', plugins);
|
||||||
logOk('Plugin entry configured');
|
logOk('Plugin entry configured (preserved existing config, added missing defaults)');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
logWarn(`Config failed: ${err.message}`);
|
logWarn(`Config failed: ${err.message}`);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user