fix(macos): surface wizard cli errors
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user