From d429b75fccf5ea1332d0536172930f83ba10eafe Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 23 Jun 2015 08:39:57 -0700 Subject: [PATCH] post-processor/vagrant: fix interpolation --- post-processor/vagrant/post-processor.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/post-processor/vagrant/post-processor.go b/post-processor/vagrant/post-processor.go index bc39c27fa..dd0a4fda2 100644 --- a/post-processor/vagrant/post-processor.go +++ b/post-processor/vagrant/post-processor.go @@ -76,13 +76,12 @@ func (p *PostProcessor) PostProcessProvider(name string, provider Provider, ui p ui.Say(fmt.Sprintf("Creating Vagrant box for '%s' provider", name)) - outputPath, err := interpolate.Render(config.OutputPath, &interpolate.Context{ - Data: &outputPathTemplate{ - ArtifactId: artifact.Id(), - BuildName: config.PackerBuildName, - Provider: name, - }, - }) + config.ctx.Data = &outputPathTemplate{ + ArtifactId: artifact.Id(), + BuildName: config.PackerBuildName, + Provider: name, + } + outputPath, err := interpolate.Render(config.OutputPath, &config.ctx) if err != nil { return nil, false, err }