mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
remove deprecated syntax for docker commit
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
This commit is contained in:
parent
3a50675a68
commit
a0b2290713
1 changed files with 4 additions and 9 deletions
|
@ -1546,17 +1546,12 @@ func (cli *DockerCli) CmdCommit(args ...string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
var name, repository, tag string
|
||||
|
||||
if cmd.NArg() == 3 {
|
||||
fmt.Fprintf(cli.err, "[DEPRECATED] The format 'CONTAINER [REPOSITORY [TAG]]' as been deprecated. Please use CONTAINER [REPOSITORY[:TAG]]\n")
|
||||
name, repository, tag = cmd.Arg(0), cmd.Arg(1), cmd.Arg(2)
|
||||
} else {
|
||||
var (
|
||||
name = cmd.Arg(0)
|
||||
repository, tag = utils.ParseRepositoryTag(cmd.Arg(1))
|
||||
}
|
||||
)
|
||||
|
||||
if name == "" {
|
||||
if name == "" || len(cmd.Args()) > 2 {
|
||||
cmd.Usage()
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue