fix: Fix typo in image cleanup code

Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
Cameron Diver 2018-11-02 14:50:22 +00:00
parent 2bdb34d78d
commit 9963d24675
No known key found for this signature in database
GPG Key ID: 69264F9C923F55C1

View File

@ -249,7 +249,7 @@ module.exports = class Images extends EventEmitter
supervisorRepos = [ supervisorImageInfo.imageName ]
if _.startsWith(supervisorImageInfo.imageName, 'balena/') # We're on a new balena/ARCH-supervisor image
supervisorRepos.push(supervisorImageInfo.imageName.replace(/^balena/, 'resin/'))
return _.some(supervisorRepos, (repo) -> imageName == img) and tagName != supervisorImageInfo.tagName
return _.some(supervisorRepos, (repo) -> imageName == repo) and tagName != supervisorImageInfo.tagName
isDangling = (image) ->
# Looks like dangling images show up with these weird RepoTags and RepoDigests sometimes
(_.isEmpty(image.RepoTags) or _.isEqual(image.RepoTags, [ '<none>:<none>' ])) and