diff options
Diffstat (limited to 'cmd/podman/volumes/import.go')
-rw-r--r-- | cmd/podman/volumes/import.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cmd/podman/volumes/import.go b/cmd/podman/volumes/import.go index 9ff17e5b1..76a311643 100644 --- a/cmd/podman/volumes/import.go +++ b/cmd/podman/volumes/import.go @@ -5,10 +5,10 @@ import ( "os" "github.com/containers/podman/v4/cmd/podman/common" - "github.com/containers/podman/v4/cmd/podman/inspect" "github.com/containers/podman/v4/cmd/podman/parse" "github.com/containers/podman/v4/cmd/podman/registry" "github.com/containers/podman/v4/pkg/domain/entities" + "github.com/containers/podman/v4/pkg/errorhandling" "github.com/containers/podman/v4/utils" "github.com/pkg/errors" "github.com/spf13/cobra" @@ -60,11 +60,15 @@ func importVol(cmd *cobra.Command, args []string) error { tarFile = os.Stdin } - inspectOpts.Type = inspect.VolumeType - volumeData, _, err := containerEngine.VolumeInspect(ctx, volumes, inspectOpts) + inspectOpts.Type = common.VolumeType + inspectOpts.Type = common.VolumeType + volumeData, errs, err := containerEngine.VolumeInspect(ctx, volumes, inspectOpts) if err != nil { return err } + if len(errs) > 0 { + return errorhandling.JoinErrors(errs) + } if len(volumeData) < 1 { return errors.New("no volume data found") } |