Skip to content

Commit 6189702

Browse files
committed
case for no images to clear
1 parent 57e8a9c commit 6189702

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

functions/clean_ecr_images/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ function findImagesToClear(images, age) {
2525
function deleteImages(images, repositoryName) {
2626
const imageIds = images.map(i => _.pick(i, 'imageDigest'));
2727

28+
if (imageIds.length == 0) return;
29+
2830
return ecr.batchDeleteImage({
2931
imageIds: imageIds,
3032
repositoryName: repositoryName,

0 commit comments

Comments
 (0)