Fix timestamp interpolation in mount path

Closes #1
This commit is contained in:
Miłosz Smółka 2019-02-01 17:46:35 +01:00
parent 3d3e933f48
commit e7e84f04e7
1 changed files with 5 additions and 1 deletions

View File

@ -168,7 +168,11 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
}
if c.ChrootMountPath == "" {
c.ChrootMountPath = "/mnt/packer-hyperone-volumes/{{timestamp}}"
path, err := interpolate.Render("/mnt/packer-hyperone-volumes/{{timestamp}}", nil)
if err != nil {
return nil, nil, err
}
c.ChrootMountPath = path
}
if c.ChrootMounts == nil {