Merge pull request #1 from mmerdes/issue4885-fix-timestamp-interpolation-in-file-name

Fix timestamp interpolation in created file name
This commit is contained in:
Matthias Merdes 2017-08-23 13:10:26 +02:00 committed by GitHub
commit ec5369454c
1 changed files with 2 additions and 1 deletions

View File

@ -51,7 +51,8 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
// Defaults
if c.VMName == "" {
c.VMName = fmt.Sprintf("packer-%s-{{timestamp}}", c.PackerBuildName)
c.VMName = fmt.Sprintf(
"packer-%s-%d", c.PackerBuildName, interpolate.InitTime.Unix())
}
// Prepare the errors