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
This commit is contained in:
Paul Hinze 2015-06-07 21:32:00 -05:00
parent 66c51d44f6
commit 18924d24fe
1 changed files with 2 additions and 1 deletions

View File

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