Allow runs to continue on tfce error

A cost estimation error does not actually stop a run, so the run was continuing in the background after the cli exits, causing confusion. This change matches the UI behavior.
pull/26618/head
Paul Thrasher 6 years ago
parent 30204ecded
commit d380f5873c
No known key found for this signature in database
GPG Key ID: D4765F9CA4D82951

@ -321,7 +321,10 @@ func (b *Remote) costEstimate(stopCtx, cancelCtx context.Context, op *backend.Op
b.CLI.Output("\n------------------------------------------------------------------------")
return nil
case tfe.CostEstimateErrored:
return fmt.Errorf(msgPrefix + " errored.")
b.CLI.Output(msgPrefix + " errored:\n")
b.CLI.Output(ce.ErrorMessage)
b.CLI.Output("\n------------------------------------------------------------------------")
return nil
case tfe.CostEstimateCanceled:
return fmt.Errorf(msgPrefix + " canceled.")
default:

Loading…
Cancel
Save