terraform: fix Refresh func signature

This commit is contained in:
Mitchell Hashimoto 2015-02-13 18:19:41 -08:00
parent 7ccba588ac
commit 7552abed8b
1 changed files with 2 additions and 3 deletions

View File

@ -278,7 +278,7 @@ func (c *Context) Plan(opts *PlanOpts) (*Plan, error) {
// //
// Even in the case an error is returned, the state will be returned and // Even in the case an error is returned, the state will be returned and
// will potentially be partially updated. // will potentially be partially updated.
func (c *Context) Refresh() (*State, []error) { func (c *Context) Refresh() (*State, error) {
v := c.acquireRun() v := c.acquireRun()
defer c.releaseRun(v) defer c.releaseRun(v)
@ -287,8 +287,7 @@ func (c *Context) Refresh() (*State, []error) {
// Do the walk // Do the walk
if _, err := c.walk(walkRefresh); err != nil { if _, err := c.walk(walkRefresh); err != nil {
var errs error return nil, err
return nil, multierror.Append(errs, err).Errors
} }
// Clean out any unused things // Clean out any unused things