Browse code

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

Fix problem where building Dockerfile `FROM name:latest`

unclejack authored on 2014/10/22 16:55:57
Showing 1 changed files
... ...
@@ -72,7 +72,7 @@ func (graph *Graph) restore() error {
72 72
 // FIXME: Implement error subclass instead of looking at the error text
73 73
 // Note: This is the way golang implements os.IsNotExists on Plan9
74 74
 func (graph *Graph) IsNotExist(err error) bool {
75
-	return err != nil && (strings.Contains(err.Error(), "does not exist") || strings.Contains(err.Error(), "No such"))
75
+	return err != nil && (strings.Contains(strings.ToLower(err.Error()), "does not exist") || strings.Contains(strings.ToLower(err.Error()), "no such"))
76 76
 }
77 77
 
78 78
 // Exists returns true if an image is registered at the given id.