mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-29 17:05:46 +08:00
build: loadInputs: remove redundant check for hasDigest
hasDigest would always be true when reaching this code, because the function would return with an error when failing to resolve the digest; if !hasDigest { return nil, errors.Errorf("oci-layout reference %q could not be resolved", v.Path) } Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
c0a986b43b
commit
17c0a3794b
@ -542,12 +542,7 @@ func loadInputs(ctx context.Context, d *driver.DriverHandle, inp Inputs, addVCSL
|
|||||||
}
|
}
|
||||||
target.OCIStores[storeName] = store
|
target.OCIStores[storeName] = store
|
||||||
|
|
||||||
layout := "oci-layout://" + storeName + ":" + tag
|
target.FrontendAttrs["context:"+k] = "oci-layout://" + storeName + ":" + tag + "@" + dig
|
||||||
if hasDigest {
|
|
||||||
layout += "@" + dig
|
|
||||||
}
|
|
||||||
|
|
||||||
target.FrontendAttrs["context:"+k] = layout
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
st, err := os.Stat(v.Path)
|
st, err := os.Stat(v.Path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user