1
0
mirror of https://github.com/docker/docs.git synced 2026-11-05 00:14:17 +03:00

downloadTargets should continue on ErrMissingMeta, not ErrMetaNotFound. ErrMetaNotFoudn will ocurr when we expect to find the data and don't. ErrMissingMeta indicates it's not in the snapshot and that's OK for targets delegations (technically it's OK for the targets role too, indicating simply an empty repository with lazy targets file creation).

Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
This commit is contained in:
David Lawrence
2015-12-18 11:33:50 -08:00
parent a2a4870512
commit 882df3d429

View File

@@ -393,7 +393,7 @@ func (c *Client) downloadTargets(role string) error {
keyIDs := r.KeyIDs
s, err := c.getTargetsFile(role, keyIDs, snap.Meta, root.ConsistentSnapshot, r.Threshold)
if err != nil {
if _, ok := err.(store.ErrMetaNotFound); ok {
if _, ok := err.(store.ErrMissingMeta); ok {
// if the role meta hasn't been published,
// that's ok, continue
continue