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:
parent
22fb82963c
commit
6f7bc4f5d7
|
@ -205,7 +205,7 @@ func (c *ApplyCommand) Run(args []string) int {
|
||||||
}
|
}
|
||||||
case <-op.Done():
|
case <-op.Done():
|
||||||
if err := op.Err; err != nil {
|
if err := op.Err; err != nil {
|
||||||
c.Ui.Error(err.Error())
|
c.showDiagnostics(err)
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,7 +113,7 @@ func (c *PlanCommand) Run(args []string) int {
|
||||||
// Wait for the operation to complete
|
// Wait for the operation to complete
|
||||||
<-op.Done()
|
<-op.Done()
|
||||||
if err := op.Err; err != nil {
|
if err := op.Err; err != nil {
|
||||||
c.Ui.Error(err.Error())
|
c.showDiagnostics(err)
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ func (c *RefreshCommand) Run(args []string) int {
|
||||||
// Wait for the operation to complete
|
// Wait for the operation to complete
|
||||||
<-op.Done()
|
<-op.Done()
|
||||||
if err := op.Err; err != nil {
|
if err := op.Err; err != nil {
|
||||||
c.Ui.Error(err.Error())
|
c.showDiagnostics(err)
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue