瀏覽代碼

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

Fix problem where building Dockerfile `FROM name:latest`
unclejack 10 年之前
父節點
當前提交
c694c66e2f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      graph/graph.go

+ 1 - 1
graph/graph.go

@@ -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.