Don't set empty target state in local mode

Change-type: patch
Signed-off-by: Cameron Diver <cameron@resin.io>
This commit is contained in:
Cameron Diver 2018-10-09 12:00:31 +01:00
parent 188e85263f
commit 5c0c880a10
No known key found for this signature in database
GPG Key ID: 69264F9C923F55C1

View File

@ -822,13 +822,10 @@ module.exports = class ApplicationManager extends EventEmitter
return { imagesToSave, imagesToRemove }
_inferNextSteps: (cleanupNeeded, availableImages, downloading, supervisorNetworkReady, current, target, ignoreImages, { localMode, delta }) =>
localMode = checkTruthy(localMode)
delta = checkTruthy(delta)
Promise.try =>
delta = checkTruthy(delta)
if checkTruthy(localMode)
target = _.cloneDeep(target)
target.local.apps = _.mapValues target.local.apps, (app) ->
app.services = []
return app
if localMode
ignoreImages = true
currentByAppId = current.local.apps ? {}
targetByAppId = target.local.apps ? {}