ensure error is correctly handled when generating chart's oci manifest

Signed-off-by: Josh Wolf <josh@joshwolf.dev>
pull/10294/head
Josh Wolf 3 years ago
parent d2d8e52401
commit fae5009382

@ -242,7 +242,6 @@ func (c *Client) Pull(ref string, options ...PullOption) (*PullResult, error) {
oras.WithLayerDescriptors(func(l []ocispec.Descriptor) {
layers = l
}))
if err != nil {
fmt.Println(err)
return nil, err
@ -456,7 +455,11 @@ func (c *Client) Push(data []byte, ref string, options ...PushOption) (*PushResu
}
manifestData, manifest, err := content.GenerateManifest(&configDescriptor, nil, descriptors...)
if err = memoryStore.StoreManifest(ref, manifest, manifestData); err != nil {
if err != nil {
return nil, err
}
if err := memoryStore.StoreManifest(ref, manifest, manifestData); err != nil {
return nil, err
}

Loading…
Cancel
Save