From 766d217ed71f511b12a30e13efa829bcf3b05b23 Mon Sep 17 00:00:00 2001 From: Chris Bednarski Date: Fri, 12 Jun 2015 17:34:46 -0700 Subject: [PATCH] Pull config into the builder --- builder/file/builder.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/builder/file/builder.go b/builder/file/builder.go index 89047ab75..3b00aae60 100644 --- a/builder/file/builder.go +++ b/builder/file/builder.go @@ -33,8 +33,14 @@ type Builder struct { // // Prepare should return a list of warnings along with any errors // that occured while preparing. -func (b *Builder) Prepare(...interface{}) ([]string, error) { - return nil, nil +func (b *Builder) Prepare(raws ...interface{}) ([]string, error) { + c, warnings, errs := NewConfig(raws...) + if errs != nil { + return warnings, errs + } + b.config = c + + return warnings, nil } // Run is where the actual build should take place. It takes a Build and a Ui.