1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #8692 from jfrazelle/8690-latest-tag-problem

Fix problem where building Dockerfile `FROM name:latest`
This commit is contained in:
unclejack 2014-10-22 10:55:57 +03:00
commit c694c66e2f

View file

@ -72,7 +72,7 @@ func (graph *Graph) restore() error {
// FIXME: Implement error subclass instead of looking at the error text
// Note: This is the way golang implements os.IsNotExists on Plan9
func (graph *Graph) IsNotExist(err error) bool {
return err != nil && (strings.Contains(err.Error(), "does not exist") || strings.Contains(err.Error(), "No such"))
return err != nil && (strings.Contains(strings.ToLower(err.Error()), "does not exist") || strings.Contains(strings.ToLower(err.Error()), "no such"))
}
// Exists returns true if an image is registered at the given id.