Skip to content

Commit 12882a8

Browse files
committed
fix: allow onboarding config size drops
1 parent 394bc9c commit 12882a8

5 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/commands/onboard-non-interactive.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ async function runNonInteractiveMigrationImport(params: {
8383
await replaceConfigFile({
8484
nextConfig: config,
8585
...(params.baseHash !== undefined ? { baseHash: params.baseHash } : {}),
86+
writeOptions: { allowConfigSizeDrop: true },
8687
});
8788
logConfigUpdated(params.runtime);
8889
return config;

src/commands/onboard-non-interactive/local.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ export async function runNonInteractiveLocalSetup(params: {
208208
await replaceConfigFile({
209209
nextConfig,
210210
...(baseHash !== undefined ? { baseHash } : {}),
211+
writeOptions: { allowConfigSizeDrop: true },
211212
});
212213
logConfigUpdated(runtime);
213214
await preparePostConfigBundledRuntimeDeps({ config: nextConfig, runtime });

src/commands/onboard-non-interactive/remote.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export async function runNonInteractiveRemoteSetup(params: {
4242
await replaceConfigFile({
4343
nextConfig,
4444
...(baseHash !== undefined ? { baseHash } : {}),
45+
writeOptions: { allowConfigSizeDrop: true },
4546
});
4647
logConfigUpdated(runtime);
4748

src/wizard/setup.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,7 @@ describe("runSetupWizard", () => {
537537
}),
538538
}),
539539
}),
540+
writeOptions: expect.objectContaining({ allowConfigSizeDrop: true }),
540541
}),
541542
);
542543
expect(ensureWorkspaceAndSessions).toHaveBeenCalledWith(

src/wizard/setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ async function writeWizardConfigFile(config: OpenClawConfig): Promise<OpenClawCo
6161
commit: async (nextConfig, writeOptions) => {
6262
await replaceConfigFile({
6363
nextConfig,
64-
...(writeOptions ? { writeOptions } : {}),
64+
writeOptions: { ...writeOptions, allowConfigSizeDrop: true },
6565
afterWrite: { mode: "auto" },
6666
});
6767
},

0 commit comments

Comments
 (0)