Merge pull request #9765 from thaJeztah/improve-error-message-3036

Improve error message for conflicting container name.
This commit is contained in:
Jessie Frazelle 2014-12-22 18:02:48 -08:00
Родитель 7a3efc9aa5 aa9c9569c2
Коммит 034ba8b88f
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -478,8 +478,8 @@ func (daemon *Daemon) reserveName(id, name string) (string, error) {
} else {
nameAsKnownByUser := strings.TrimPrefix(name, "/")
return "", 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)
"Conflict. The name %q is already in use by container %s. You have to delete that container to be able to reuse that name.", nameAsKnownByUser,
utils.TruncateID(conflictingContainer.ID))
}
}
return name, nil