mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
Merge pull request #21668 from Luap99/machine-pull-interrupt
machine: ocipull do not error if downloaddir exists
This commit is contained in:
@ -28,10 +28,6 @@ type PullOptions struct {
|
||||
|
||||
// Pull `imageInput` from a container registry to `sourcePath`.
|
||||
func Pull(ctx context.Context, imageInput types.ImageReference, localDestPath *define.VMFile, options *PullOptions) error {
|
||||
if _, err := os.Stat(localDestPath.GetPath()); err == nil {
|
||||
return fmt.Errorf("%q already exists", localDestPath.GetPath())
|
||||
}
|
||||
|
||||
destRef, err := layout.ParseReference(localDestPath.GetPath())
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user