packer-cn/builder/virtualbox/common/vbox_version_config.go

19 lines
372 B
Go
Raw Normal View History

2013-12-22 14:50:29 -05:00
package common
import (
2017-04-04 16:39:01 -04:00
"github.com/hashicorp/packer/template/interpolate"
2013-12-22 14:50:29 -05:00
)
type VBoxVersionConfig struct {
VBoxVersionFile *string `mapstructure:"virtualbox_version_file"`
2013-12-22 14:50:29 -05:00
}
func (c *VBoxVersionConfig) Prepare(ctx *interpolate.Context) []error {
if c.VBoxVersionFile == nil {
default_file := ".vbox_version"
c.VBoxVersionFile = &default_file
2013-12-22 14:50:29 -05:00
}
return nil
2013-12-22 14:50:29 -05:00
}