add validation to prevent users from being confused about format functionality

pull/7074/head
Megan Marsh 7 years ago
parent 963982a6a0
commit 0fe4d79bbf

@ -167,7 +167,12 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
}
}
if c.Format == "" {
if c.Format != "" {
if c.RemoteType != "esx5" {
errs = packer.MultiErrorAppend(errs,
fmt.Errorf("format is only valid when RemoteType=esx5"))
}
} else {
c.Format = "ovf"
}

Loading…
Cancel
Save