Merge pull request #5274 from mmerdes/master

Fix timestamp interpolation in created file name
This commit is contained in:
Matthew Hooker 2017-08-23 14:08:27 -07:00 committed by GitHub
commit 28894fb418
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