From e38e977a0410b754b6f318ff973dc15e6d756023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Djibril=20Kon=C3=A9?= Date: Tue, 18 Mar 2014 21:18:36 +0100 Subject: [PATCH] Harmonize / across all name-related commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Docker-DCO-1.1-Signed-off-by: Djibril Koné (github: enokd) Harmonize / across all name-related commands Docker-DCO-1.1-Signed-off-by: Djibril Koné (github: enokd) Harmonize / across all name-related commands:Return an error when repeated / Docker-DCO-1.1-Signed-off-by: Djibril Koné (github: enokd) --- api/client.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/client.go b/api/client.go index 10dd9406dc..07a3d25e5c 100644 --- a/api/client.go +++ b/api/client.go @@ -1452,6 +1452,11 @@ func (cli *DockerCli) CmdCommit(args ...string) error { return nil } + re := regexp.MustCompile("/{2}") + if re.MatchString(repository) { + return fmt.Errorf("Error: Bad image name. Please rename your image in the format /") + } + v := url.Values{} v.Set("container", name) v.Set("repo", repository)