include Wilken's suggestion

This commit is contained in:
Megan Marsh 2020-05-28 16:46:33 -07:00
parent a568ffce0a
commit 03b2c4355e
1 changed files with 2 additions and 4 deletions

View File

@ -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 == "" {