Skip missing images instead of failing the push

This commit is contained in:
Guillaume J. Charmes 2013-03-25 15:29:00 -07:00
parent bd63ae72e6
commit 504663a6ee
1 changed files with 3 additions and 2 deletions

View File

@ -357,10 +357,11 @@ func (graph *Graph) LookupRemoteRepository(remote string, authConfig *auth.AuthC
}
func (graph *Graph) pushPrimitive(stdout io.Writer, remote, tag, imgId string, authConfig *auth.AuthConfig) error {
// CHeck if the local impage exists
// Check if the local impage exists
img, err := graph.Get(imgId)
if err != nil {
return err
fmt.Fprintf(stdout, "Image %s for tag %s not found, skipping.\n", imgId, tag)
return nil
}
// Push the image
if err = graph.PushImage(stdout, img, authConfig); err != nil {