зеркало из https://github.com/microsoft/docker.git
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:
Родитель
3a50675a68
Коммит
a0b2290713
|
@ -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 {
|
||||
name = cmd.Arg(0)
|
||||
var (
|
||||
name = cmd.Arg(0)
|
||||
repository, tag = utils.ParseRepositoryTag(cmd.Arg(1))
|
||||
}
|
||||
)
|
||||
|
||||
if name == "" {
|
||||
if name == "" || len(cmd.Args()) > 2 {
|
||||
cmd.Usage()
|
||||
return nil
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче