mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 06:56:24 +00:00
fix(docker): defensive digest check
This commit is contained in:
parent
b80e7035c5
commit
325447e7da
1 changed files with 5 additions and 2 deletions
|
@ -351,7 +351,10 @@ async function getConfigDigest(
|
|||
return null;
|
||||
}
|
||||
|
||||
if (manifest.mediaType === MediaType.manifestListV2) {
|
||||
if (
|
||||
manifest.mediaType === MediaType.manifestListV2 &&
|
||||
manifest.manifests.length
|
||||
) {
|
||||
logger.trace(
|
||||
{ registry, dockerRepository, tag },
|
||||
'Found manifest list, using first image'
|
||||
|
@ -364,7 +367,7 @@ async function getConfigDigest(
|
|||
}
|
||||
|
||||
if (manifest.mediaType === MediaType.manifestV2) {
|
||||
return manifest.config.digest;
|
||||
return manifest.config?.digest || null;
|
||||
}
|
||||
|
||||
logger.debug({ manifest }, 'Invalid manifest - returning');
|
||||
|
|
Loading…
Reference in a new issue