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:
Sebastiaan van Stijn 2024-05-25 16:36:52 +02:00
parent c0a986b43b
commit 17c0a3794b
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C

View File

@ -542,12 +542,7 @@ func loadInputs(ctx context.Context, d *driver.DriverHandle, inp Inputs, addVCSL
}
target.OCIStores[storeName] = store
layout := "oci-layout://" + storeName + ":" + tag
if hasDigest {
layout += "@" + dig
}
target.FrontendAttrs["context:"+k] = layout
target.FrontendAttrs["context:"+k] = "oci-layout://" + storeName + ":" + tag + "@" + dig
continue
}
st, err := os.Stat(v.Path)