Skip to content

Commit

Permalink
don't error if no source image id was not passed
Browse files Browse the repository at this point in the history
  • Loading branch information
azr committed Nov 23, 2021
1 parent eb9515f commit 52e55e7
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions packer/registry/image/image.go
Expand Up @@ -50,10 +50,6 @@ func (i *Image) Validate() error {
return errors.New("error registry image does not contain a valid ProviderName")
}

if i.SourceImageID == "" {
return errors.New("error registry image does not contain a valid SourceImageID")
}

return nil
}

Expand All @@ -70,7 +66,6 @@ func (i *Image) String() string {
// calling f(k,v). The func f is responsible for type asserting the expected type for the key and value before
// trying to create an Image from it.
func FromMappedData(mappedData interface{}, f func(key, value interface{}) (*Image, error)) ([]*Image, error) {

mapValue := reflect.ValueOf(mappedData)
if mapValue.Kind() != reflect.Map {
return nil, errors.New("error the incoming mappedData does not appear to be a map; found type to be" + mapValue.Kind().String())
Expand Down

0 comments on commit 52e55e7

Please sign in to comment.