From 03b2c4355ed25fe8eba4a71483941473b0609dca Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Thu, 28 May 2020 16:46:33 -0700 Subject: [PATCH] include Wilken's suggestion --- builder/vagrant/builder.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/builder/vagrant/builder.go b/builder/vagrant/builder.go index b72b3a39d..c2ea099ac 100644 --- a/builder/vagrant/builder.go +++ b/builder/vagrant/builder.go @@ -197,16 +197,14 @@ func (b *Builder) Prepare(raws ...interface{}) ([]string, []string, error) { } if len(b.config.PackageInclude) > 0 { - include := []string{} - for _, rawFile := range b.config.PackageInclude { + for i, rawFile := range b.config.PackageInclude { inclFile, err := filepath.Abs(rawFile) if err != nil { errs = packer.MultiErrorAppend(errs, fmt.Errorf("unable to determine absolute path for file to be included: %s", rawFile)) } - include = append(include, inclFile) + b.config.PackageInclude[i] = inclFile } - b.config.PackageInclude = include } if b.config.TeardownMethod == "" {