fix(cli): make setup conflict error actionable

This commit is contained in:
Amp
2026-08-21 09:09:35 +00:00
parent 7e3508a104
commit 7264fe3890
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -157,7 +157,7 @@ describe("registerSetupCommand", () => {
await runCli(["setup", ...args]);
expect(runtime.error).toHaveBeenCalledWith(
`${flag} cannot be combined with onboarding options.`,
`${flag} cannot be combined with onboarding options. Rerun with either --message/--yes or onboarding options, not both.`,
);
expect(runtime.exit).toHaveBeenCalledWith(1);
expect(readConfigFileSnapshotMock).not.toHaveBeenCalled();
+1 -1
View File
@@ -261,7 +261,7 @@ export function registerSetupCommand(program: Command): void {
.map((option) => option.long ?? option.short ?? option.flags)
.toSorted();
defaultRuntime.error(
`${systemAgentFlags.join(", ")} cannot be combined with onboarding options.`,
`${systemAgentFlags.join(", ")} cannot be combined with onboarding options. Rerun with either --message/--yes or onboarding options, not both.`,
);
defaultRuntime.exit(1);
return;