mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-20 11:38:51 +00:00
findSimilarImage should always return an array, and test the repoTag[0]
This commit is contained in:
parent
8e4e844cfa
commit
1a5a9b0e23
@ -39,10 +39,10 @@ findSimilarImage = (repoTag) ->
|
||||
return repoTag
|
||||
|
||||
# Otherwise return the most specific supervisor tag (commit hash)
|
||||
for repoTag in repoTags when /resin\/.*-supervisor.*:[0-9a-f]{6}/.test(repoTag)
|
||||
for repoTag in repoTags when /resin\/.*-supervisor.*:[0-9a-f]{6}/.test(repoTag[0])
|
||||
return repoTag
|
||||
|
||||
return config.supervisorImage
|
||||
return [ config.supervisorImage ]
|
||||
|
||||
exports.rsyncImageWithProgress = (imgDest, onProgress) ->
|
||||
findSimilarImage(imgDest)
|
||||
|
Loading…
Reference in New Issue
Block a user