Fix config loading
This commit is contained in:
parent
3c3024fd92
commit
73b9acc9cc
@ -171,8 +171,9 @@ func (c *CommonConfig) Prepare(upper interface{}, raws ...interface{}) ([]string
|
||||
|
||||
// Validation
|
||||
|
||||
if c.HTTPPortMin > c.HTTPPortMax {
|
||||
errs = packersdk.MultiErrorAppend(errs, errors.New("the HTTP min port must be less than the max"))
|
||||
// Lower bound is not checked in commonsteps.HTTPConfig
|
||||
if c.HTTPPortMin < 0 {
|
||||
errs = packersdk.MultiErrorAppend(errs, errors.New("the HTTP min port must greater than zero"))
|
||||
}
|
||||
|
||||
switch c.Format {
|
||||
|
@ -70,7 +70,7 @@ type Config struct {
|
||||
func (c *Config) Prepare(raws ...interface{}) ([]string, []string, error) {
|
||||
var errs *packersdk.MultiError
|
||||
|
||||
params, warnings, merrs := c.CommonConfig.Prepare(c, raws)
|
||||
params, warnings, merrs := c.CommonConfig.Prepare(c, raws...)
|
||||
if merrs != nil {
|
||||
errs = packersdk.MultiErrorAppend(errs, merrs)
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ type Config struct {
|
||||
|
||||
func (c *Config) Prepare(raws ...interface{}) ([]string, []string, error) {
|
||||
var errs *packersdk.MultiError
|
||||
params, warnings, merrs := c.CommonConfig.Prepare(c, raws)
|
||||
params, warnings, merrs := c.CommonConfig.Prepare(c, raws...)
|
||||
if merrs != nil {
|
||||
errs = packersdk.MultiErrorAppend(errs, merrs)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user