diff options
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/api/handlers/compat/ping.go | 1 | ||||
-rw-r--r-- | pkg/specgen/volumes.go | 5 |
2 files changed, 2 insertions, 4 deletions
diff --git a/pkg/api/handlers/compat/ping.go b/pkg/api/handlers/compat/ping.go index 5b6c38a2e..9f6611b30 100644 --- a/pkg/api/handlers/compat/ping.go +++ b/pkg/api/handlers/compat/ping.go @@ -25,5 +25,4 @@ func Ping(w http.ResponseWriter, r *http.Request) { if r.Method == http.MethodGet { fmt.Fprint(w, "OK") } - fmt.Fprint(w, "\n") } diff --git a/pkg/specgen/volumes.go b/pkg/specgen/volumes.go index 1178f9960..41efee3b3 100644 --- a/pkg/specgen/volumes.go +++ b/pkg/specgen/volumes.go @@ -84,11 +84,10 @@ func GenVolumeMounts(volumeFlag []string) (map[string]spec.Mount, map[string]*Na return nil, nil, nil, err } } - // 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 { |