summaryrefslogtreecommitdiff
path: root/pkg/specgen/volumes.go
diff options
context:
space:
mode:
authorjortkoopmans <jort@jabo-solutions.eu>2020-11-30 15:58:23 +0100
committerGitHub <noreply@github.com>2020-11-30 15:58:23 +0100
commit84e8b2afa795ca060f4d2c5206f47d320292ed9b (patch)
treeea0e985d3f50d389b33fdb403d240e817251fd8c /pkg/specgen/volumes.go
parent5cfbe0b78e3672dd67cd028b85d816fc19d6a614 (diff)
parentfc85ec942ee3273f5ad56381a0f6b9e78aea59bf (diff)
downloadpodman-84e8b2afa795ca060f4d2c5206f47d320292ed9b.tar.gz
podman-84e8b2afa795ca060f4d2c5206f47d320292ed9b.tar.bz2
podman-84e8b2afa795ca060f4d2c5206f47d320292ed9b.zip
Merge branch 'master' into patch-1
Diffstat (limited to 'pkg/specgen/volumes.go')
-rw-r--r--pkg/specgen/volumes.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/specgen/volumes.go b/pkg/specgen/volumes.go
index 1178f9960..a4f42d715 100644
--- a/pkg/specgen/volumes.go
+++ b/pkg/specgen/volumes.go
@@ -87,8 +87,8 @@ func GenVolumeMounts(volumeFlag []string) (map[string]spec.Mount, map[string]*Na
// Do not check source dir for anonymous volumes
if len(splitVol) > 1 {
- if err := parse.ValidateVolumeHostDir(src); err != nil {
- return nil, nil, nil, err
+ if len(src) == 0 {
+ return nil, nil, nil, errors.New("host directory cannot be empty")
}
}
if err := parse.ValidateVolumeCtrDir(dest); err != nil {