Skip to content

Commit 70c962b

Browse files
committed
hot fix, image should return if pull fails, but image exists
1 parent b21ab19 commit 70c962b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

image.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ func (c *Client) Image(ctx context.Context, name string, options ...ImageOption)
3636
}
3737
} else {
3838
if image, err = image.Pull(ctx); err != nil {
39-
return nil, errorImagePull(name, err)
39+
err = errorImagePull(name, err)
40+
if !imageExists {
41+
image = nil
42+
}
43+
44+
return image, err
4045
}
4146
}
4247

0 commit comments

Comments
 (0)