mirror of https://github.com/openclaw/openclaw.git
fix(regression): persist auto-enabled directory config
This commit is contained in:
parent
687d23ae8d
commit
384bdde514
|
|
@ -150,5 +150,6 @@ describe("registerDirectoryCli", () => {
|
|||
cfg: autoEnabledConfig,
|
||||
}),
|
||||
);
|
||||
expect(mocks.writeConfigFile).toHaveBeenCalledWith(autoEnabledConfig);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -98,10 +98,11 @@ export function registerDirectoryCli(program: Command) {
|
|||
.option("--json", "Output JSON", false);
|
||||
|
||||
const resolve = async (opts: { channel?: string; account?: string }) => {
|
||||
let cfg = applyPluginAutoEnable({
|
||||
const autoEnabled = applyPluginAutoEnable({
|
||||
config: loadConfig(),
|
||||
env: process.env,
|
||||
}).config;
|
||||
});
|
||||
let cfg = autoEnabled.config;
|
||||
const explicitChannel = opts.channel?.trim();
|
||||
const resolvedExplicit = explicitChannel
|
||||
? await resolveInstallableChannelPlugin({
|
||||
|
|
@ -115,6 +116,8 @@ export function registerDirectoryCli(program: Command) {
|
|||
if (resolvedExplicit?.configChanged) {
|
||||
cfg = resolvedExplicit.cfg;
|
||||
await writeConfigFile(cfg);
|
||||
} else if (autoEnabled.changes.length > 0) {
|
||||
await writeConfigFile(cfg);
|
||||
}
|
||||
const selection = explicitChannel
|
||||
? {
|
||||
|
|
|
|||
Loading…
Reference in New Issue