mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-24 00:41:41 -04:00
add validation to prevent users from being confused about format functionality
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user