mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-03 00:20:22 +00:00
refactor(config): use source snapshots for config writes
This commit is contained in:
@@ -131,7 +131,11 @@ export async function runSetupWizard(
|
||||
await requireRiskAcknowledgement({ opts, prompter });
|
||||
|
||||
const snapshot = await readConfigFileSnapshot();
|
||||
let baseConfig: OpenClawConfig = snapshot.valid ? (snapshot.exists ? snapshot.config : {}) : {};
|
||||
let baseConfig: OpenClawConfig = snapshot.valid
|
||||
? snapshot.exists
|
||||
? (snapshot.sourceConfig ?? snapshot.config)
|
||||
: {}
|
||||
: {};
|
||||
|
||||
if (snapshot.exists && !snapshot.valid) {
|
||||
await prompter.note(onboardHelpers.summarizeExistingConfig(baseConfig), "Invalid config");
|
||||
|
||||
Reference in New Issue
Block a user