From 1cb7b9adc6b9a4e4c8f746c6886a7229b0efda91 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Wed, 27 Nov 2013 12:58:54 +1000 Subject: [PATCH] there appears to be a slash prepended to a container name internally - don't tell the user about it in an error message, it might cause them to worry about it --- runtime.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime.go b/runtime.go index f58be836bd..a7c2659b00 100644 --- a/runtime.go +++ b/runtime.go @@ -422,7 +422,8 @@ func (runtime *Runtime) Create(config *Config, name string) (*Container, []strin if _, err := runtime.containerGraph.Set(name, id); err != nil { if strings.HasSuffix(err.Error(), "name are not unique") { conflictingContainer, _ := runtime.GetByName(name) - return nil, nil, fmt.Errorf("Conflict, The name %s is already assigned to %s. You have to delete (or rename) that container to be able to assign %s to a container again.", name, utils.TruncateID(conflictingContainer.ID), name) + nameAsKnownByUser := strings.TrimPrefix(name, "/") + return nil, nil, fmt.Errorf("Conflict, The name %s is already assigned to %s. You have to delete (or rename) that container to be able to assign %s to a container again.", nameAsKnownByUser, utils.TruncateID(conflictingContainer.ID), nameAsKnownByUser) } return nil, nil, err }