Skip to content

Commit 52e55e7

Browse files
committed
don't error if no source image id was not passed
1 parent eb9515f commit 52e55e7

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

packer/registry/image/image.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ func (i *Image) Validate() error {
5050
return errors.New("error registry image does not contain a valid ProviderName")
5151
}
5252

53-
if i.SourceImageID == "" {
54-
return errors.New("error registry image does not contain a valid SourceImageID")
55-
}
56-
5753
return nil
5854
}
5955

@@ -70,7 +66,6 @@ func (i *Image) String() string {
7066
// calling f(k,v). The func f is responsible for type asserting the expected type for the key and value before
7167
// trying to create an Image from it.
7268
func FromMappedData(mappedData interface{}, f func(key, value interface{}) (*Image, error)) ([]*Image, error) {
73-
7469
mapValue := reflect.ValueOf(mappedData)
7570
if mapValue.Kind() != reflect.Map {
7671
return nil, errors.New("error the incoming mappedData does not appear to be a map; found type to be" + mapValue.Kind().String())

0 commit comments

Comments
 (0)