You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/com/synopsys/integration/blackduck/imageinspector/image/oci/OciManifestDescriptorParser.java
@@ -37,9 +40,13 @@ public OciDescriptor getManifestDescriptor(OciImageIndex ociImageIndex,
37
40
thrownewIntegrationException(String.format("No manifest descriptor with media type %s was found in OCI image index", MANIFEST_FILE_MEDIA_TYPE));
38
41
}
39
42
if ((trueManifests.size() == 1) && StringUtils.isBlank(givenRepo)) {
43
+
logger.debug(String.format("User did not specify a repo:tag, and there's only one manifest; inspecting that one; digest=%s", trueManifests.get(0).getDigest()));
40
44
returntrueManifests.get(0);
41
45
}
42
-
if (StringUtils.isBlank(givenTag)) {
46
+
if ((trueManifests.size() > 1) && StringUtils.isBlank(givenRepo)) {
47
+
thrownewIntegrationException("When the image contains multiple manifests, the target image and tag to inspect must be specified");
48
+
}
49
+
if (StringUtils.isNotBlank(givenRepo) && StringUtils.isBlank(givenTag)) {
0 commit comments