1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #392 from dotcloud/rm_usage-fix

Display usage when no parameter in docker rm
This commit is contained in:
Guillaume J. Charmes 2013-04-11 07:56:46 -07:00
commit c902c43766

View file

@ -389,6 +389,10 @@ func (srv *Server) CmdRm(stdin io.ReadCloser, stdout io.Writer, args ...string)
if err := cmd.Parse(args); err != nil { if err := cmd.Parse(args); err != nil {
return nil return nil
} }
if cmd.NArg() < 1 {
cmd.Usage()
return nil
}
for _, name := range cmd.Args() { for _, name := range cmd.Args() {
container := srv.runtime.Get(name) container := srv.runtime.Get(name)
if container == nil { if container == nil {