diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-04-04 09:29:12 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-04 09:29:12 -0400 |
commit | 0e3a704f69b53246ff770aba3a1258a6c2d35ba0 (patch) | |
tree | b53da53c58207e87eedca0a5172a4f447ae52c77 /pkg/specgenutil/volumes.go | |
parent | 48c4015ac177e780a4ee925e49fcd30e375e60c5 (diff) | |
parent | bf4318e60697c0d38b520ff79fd85f45e18b1309 (diff) | |
download | podman-0e3a704f69b53246ff770aba3a1258a6c2d35ba0.tar.gz podman-0e3a704f69b53246ff770aba3a1258a6c2d35ba0.tar.bz2 podman-0e3a704f69b53246ff770aba3a1258a6c2d35ba0.zip |
Merge pull request #13757 from andrewaylett/anonymous_volumes
Allow creating anonymous volumes with --mount
Diffstat (limited to 'pkg/specgenutil/volumes.go')
-rw-r--r-- | pkg/specgenutil/volumes.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/pkg/specgenutil/volumes.go b/pkg/specgenutil/volumes.go index dd7eed2fd..8a861077a 100644 --- a/pkg/specgenutil/volumes.go +++ b/pkg/specgenutil/volumes.go @@ -518,7 +518,7 @@ func getDevptsMount(args []string) (spec.Mount, error) { func getNamedVolume(args []string) (*specgen.NamedVolume, error) { newVolume := new(specgen.NamedVolume) - var setSource, setDest, setRORW, setSuid, setDev, setExec, setOwnership bool + var setDest, setRORW, setSuid, setDev, setExec, setOwnership bool for _, val := range args { kv := strings.SplitN(val, "=", 2) @@ -554,7 +554,6 @@ func getNamedVolume(args []string) (*specgen.NamedVolume, error) { return nil, errors.Wrapf(optionArgError, kv[0]) } newVolume.Name = kv[1] - setSource = true case "target", "dst", "destination": if len(kv) == 1 { return nil, errors.Wrapf(optionArgError, kv[0]) @@ -585,9 +584,6 @@ func getNamedVolume(args []string) (*specgen.NamedVolume, error) { } } - if !setSource { - return nil, errors.Errorf("must set source volume") - } if !setDest { return nil, noDestError } |