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.
This commit is contained in:
Paul Thrasher 2020-10-16 17:20:35 -07:00
parent 30204ecded
commit d380f5873c
No known key found for this signature in database
GPG Key ID: D4765F9CA4D82951
1 changed files with 4 additions and 1 deletions

View File

@ -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: