Skip to content

Commit 1ec04c6

Browse files
committed
refactor(update): unify finalization command registration
1 parent f0206d9 commit 1ec04c6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/cli/update-cli.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ function inheritedUpdateTimeout(
3838
return inheritOptionFromParent<string>(command, "timeout");
3939
}
4040

41-
function registerUpdateRepairCommand(update: Command, name: string, params?: { hidden?: boolean }) {
42-
const command = params?.hidden ? update.command(name, { hidden: true }) : update.command(name);
41+
function registerUpdateFinalizationCommand(update: Command, name: string, hidden: boolean) {
42+
const command = update.command(name, { hidden });
4343
command
4444
.description("Repair post-update doctor and plugin convergence")
4545
.option("--json", "Output result as JSON", false)
@@ -154,8 +154,8 @@ ${theme.muted("Docs:")} ${formatDocsLink("/cli/update", "docs.openclaw.ai/cli/up
154154
}
155155
});
156156

157-
registerUpdateRepairCommand(update, "repair");
158-
registerUpdateRepairCommand(update, "finalize", { hidden: true });
157+
registerUpdateFinalizationCommand(update, "repair", false);
158+
registerUpdateFinalizationCommand(update, "finalize", true);
159159

160160
update
161161
.command("wizard")

0 commit comments

Comments
 (0)