cosign: clear errors if manifest or bundle payload found
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
@@ -142,15 +142,12 @@ export class Cosign {
|
||||
bundlePayload = obj as SerializedBundle;
|
||||
}
|
||||
|
||||
if (bundlePayload && signatureManifestDigest) {
|
||||
if (bundlePayload && (signatureManifestDigest || signatureManifestFallbackDigest)) {
|
||||
errors = undefined; // clear errors if we have both payload and manifest digest
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!errors && !bundlePayload) {
|
||||
throw new Error(`Cannot find signature bundle from cosign command output: ${logs}`);
|
||||
}
|
||||
|
||||
return {
|
||||
bundle: bundlePayload,
|
||||
signatureManifestDigest: signatureManifestDigest || signatureManifestFallbackDigest,
|
||||
|
||||
Reference in New Issue
Block a user