Merge pull request #842 from balena-io/fix-resin-cleanup

Fix typo that prevented deleting old resin/ supervisor images
This commit is contained in:
Pablo Carranza Vélez 2018-12-12 13:40:16 -03:00 committed by GitHub
commit f7fd34d96f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -248,7 +248,7 @@ module.exports = class Images extends EventEmitter
isSupervisorRepoTag = ({ imageName, tagName }) ->
supervisorRepos = [ supervisorImageInfo.imageName ]
if _.startsWith(supervisorImageInfo.imageName, 'balena/') # We're on a new balena/ARCH-supervisor image
supervisorRepos.push(supervisorImageInfo.imageName.replace(/^balena/, 'resin/'))
supervisorRepos.push(supervisorImageInfo.imageName.replace(/^balena/, 'resin'))
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