From 6f7bc4f5d76e322b9498ca8d68303968d6004731 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Fri, 13 Oct 2017 14:14:59 -0700 Subject: [PATCH] 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. --- command/apply.go | 2 +- command/plan.go | 2 +- command/refresh.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/command/apply.go b/command/apply.go index 9b9b89871..3bd2c0893 100644 --- a/command/apply.go +++ b/command/apply.go @@ -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 } } diff --git a/command/plan.go b/command/plan.go index 036e6fe35..757984f8f 100644 --- a/command/plan.go +++ b/command/plan.go @@ -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 } diff --git a/command/refresh.go b/command/refresh.go index b6ae6b854..f4b9921f1 100644 --- a/command/refresh.go +++ b/command/refresh.go @@ -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 }