fix(macos): surface wizard cli errors

This commit is contained in:
Peter Steinberger
2026-01-12 08:33:21 +00:00
parent 006e1352d8
commit 1f63ee565f
2 changed files with 6 additions and 5 deletions

View File

@@ -380,17 +380,17 @@ private func runWizard(client: GatewayWizardClient, opts: WizardCliOptions) asyn
do {
while true {
let status = wizardStatusString(nextResult.status) ?? (nextResult.done ? "done" : "running")
if status == "done" || nextResult.done {
print("Wizard complete.")
return
}
if status == "cancelled" {
print("Wizard cancelled.")
return
}
if status == "error" {
if status == "error" || (nextResult.done && nextResult.error != nil) {
throw WizardCliError.gatewayError(nextResult.error ?? "wizard error")
}
if status == "done" || nextResult.done {
print("Wizard complete.")
return
}
if let step = decodeWizardStep(nextResult.step) {
let answer = try promptAnswer(for: step)