command: use c.showDiagnostics for backend operation errors

This allows richer diagnostics produced by some subsystems to be displayed
in full-fidelity to the user.
This commit is contained in:
Martin Atkins 2017-10-13 14:14:59 -07:00
parent 22fb82963c
commit 6f7bc4f5d7
3 changed files with 3 additions and 3 deletions

View File

@ -205,7 +205,7 @@ func (c *ApplyCommand) Run(args []string) int {
}
case <-op.Done():
if err := op.Err; err != nil {
c.Ui.Error(err.Error())
c.showDiagnostics(err)
return 1
}
}

View File

@ -113,7 +113,7 @@ func (c *PlanCommand) Run(args []string) int {
// Wait for the operation to complete
<-op.Done()
if err := op.Err; err != nil {
c.Ui.Error(err.Error())
c.showDiagnostics(err)
return 1
}

View File

@ -84,7 +84,7 @@ func (c *RefreshCommand) Run(args []string) int {
// Wait for the operation to complete
<-op.Done()
if err := op.Err; err != nil {
c.Ui.Error(err.Error())
c.showDiagnostics(err)
return 1
}