storage: API fixups
github.com/containers/image/types.ImageReference.NewImage() can take a *github.com/containers/image/types.SystemContext now, so pass it one if pkg/storage/imageService.CanPull() has one to give it. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
parent
0651d3a8de
commit
553979e1fc
1 changed files with 5 additions and 1 deletions
|
@ -184,7 +184,11 @@ func (svc *imageService) CanPull(imageName string, options *copy.Options) (bool,
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
src, err := image.FromSource(rawSource)
|
sourceCtx := &types.SystemContext{}
|
||||||
|
if options.SourceCtx != nil {
|
||||||
|
sourceCtx = options.SourceCtx
|
||||||
|
}
|
||||||
|
src, err := image.FromSource(sourceCtx, rawSource)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
rawSource.Close()
|
rawSource.Close()
|
||||||
return false, err
|
return false, err
|
||||||
|
|
Loading…
Reference in a new issue