fix(docker): reorder manifest check

This commit is contained in:
Rhys Arkins 2019-07-18 22:08:01 +02:00
parent a7e24d51d1
commit 5695026b18

View file

@ -381,12 +381,12 @@ async function getLabels(registry, repository, tag) {
}
const manifest = JSON.parse(manifestResponse.body);
let labels = {};
const configDigest = manifest.config.digest;
// istanbul ignore if
if (!manifest.config) {
logger.warn({ manifest }, 'Docker manifest error: no config');
throw new Error('registry-failure');
}
const configDigest = manifest.config.digest;
const headers = await getAuthHeaders(registry, repository);
if (!headers) {
logger.info('No docker auth found - returning');