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

display usage when no parameter

This commit is contained in:
Victor Vieux 2013-04-11 16:27:01 +02:00
parent e41fd24542
commit c105049f7e

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 {
return nil
}
if cmd.NArg() < 1 {
cmd.Usage()
return nil
}
for _, name := range cmd.Args() {
container := srv.runtime.Get(name)
if container == nil {