From 18924d24feb5248cbba8673380a3e779ce2b8fc5 Mon Sep 17 00:00:00 2001 From: Paul Hinze Date: Sun, 7 Jun 2015 21:32:00 -0500 Subject: [PATCH] command/apply: flatten multierrors Before: ``` Error applying plan: 1 error(s) occurred: * 1 error(s) occurred: * 1 error(s) occurred: * 1 error(s) occurred: * Error creating ... ``` After: ``` Error applying plan: 1 error(s) occurred: * Error creating ... ``` Muuuch better! :D --- command/apply.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/apply.go b/command/apply.go index 529d6e701..7664fc0e8 100644 --- a/command/apply.go +++ b/command/apply.go @@ -7,6 +7,7 @@ import ( "sort" "strings" + "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform/config/module" "github.com/hashicorp/terraform/terraform" ) @@ -207,7 +208,7 @@ func (c *ApplyCommand) Run(args []string) int { "Instead, your Terraform state file has been partially updated with\n"+ "any resources that successfully completed. Please address the error\n"+ "above and apply again to incrementally change your infrastructure.", - applyErr)) + multierror.Flatten(applyErr))) return 1 }