mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
use ParseRepositoryTag instead on split on : in imagedelete
This commit is contained in:
parent
97a2dc96f2
commit
63876e7dbd
1 changed files with 1 additions and 7 deletions
|
@ -1037,13 +1037,7 @@ func (srv *Server) ImageDelete(name string, autoPrune bool) ([]APIRmi, error) {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var tag string
|
name, tag := utils.ParseRepositoryTag(name)
|
||||||
if strings.Contains(name, ":") {
|
|
||||||
nameParts := strings.Split(name, ":")
|
|
||||||
name = nameParts[0]
|
|
||||||
tag = nameParts[1]
|
|
||||||
}
|
|
||||||
|
|
||||||
return srv.deleteImage(img, name, tag)
|
return srv.deleteImage(img, name, tag)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue