mirror of
https://github.com/moby/moby.git
synced 2026-08-08 00:52:17 +00:00
Make docker volume behave like docker network
Before, typing `docker volume` with no args would forward to the handler for `docker volume ls`, except the flags for the `ls` subcommand were not supported. Instead just print the cmd usage. This makes the behavior of the `docker volume` subcommand behave exactly like the `docker network` subcommand. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
@@ -33,11 +33,12 @@ func (cli *DockerCli) CmdVolume(args ...string) error {
|
||||
}
|
||||
|
||||
description += "\nRun 'docker volume COMMAND --help' for more information on a command"
|
||||
cmd := Cli.Subcmd("volume", []string{"[COMMAND]"}, description, true)
|
||||
cmd.Require(flag.Exact, 0)
|
||||
cmd.ParseFlags(args, true)
|
||||
cmd := Cli.Subcmd("volume", []string{"[COMMAND]"}, description, false)
|
||||
|
||||
return cli.CmdVolumeLs(args...)
|
||||
cmd.Require(flag.Exact, 0)
|
||||
err := cmd.ParseFlags(args, true)
|
||||
cmd.Usage()
|
||||
return err
|
||||
}
|
||||
|
||||
// CmdVolumeLs outputs a list of Docker volumes.
|
||||
|
||||
Reference in New Issue
Block a user