mirror of
https://github.com/clearlinux/docker.git
synced 2026-10-04 07:48:44 +00:00
Better error message for "docker rmi ''"
See: https://github.com/docker/docker/issues/10867 While looking at #10867 I noticed that the error message generated for a blank image ID wasn't very helpful so this fixes that. Signed-off-by: Doug Davis <dug@us.ibm.com>
This commit is contained in:
@@ -41,6 +41,10 @@ func (daemon *Daemon) DeleteImage(eng *engine.Engine, name string, imgs *engine.
|
||||
tag = graph.DEFAULTTAG
|
||||
}
|
||||
|
||||
if name == "" {
|
||||
return fmt.Errorf("Image name can not be blank")
|
||||
}
|
||||
|
||||
img, err := daemon.Repositories().LookupImage(name)
|
||||
if err != nil {
|
||||
if r, _ := daemon.Repositories().Get(repoName); r != nil {
|
||||
|
||||
Reference in New Issue
Block a user