fix: Run checkTruthy on config values before using them

Change-type: patch
Signed-off-by: Cameron Diver <cameron@resin.io>
This commit is contained in:
Cameron Diver 2018-10-23 18:28:32 +01:00
parent 4b07d539c7
commit 1879c76b00
No known key found for this signature in database
GPG Key ID: 69264F9C923F55C1

View File

@ -905,8 +905,8 @@ module.exports = class ApplicationManager extends EventEmitter
@networks.supervisorNetworkReady()
@config.get('delta')
(cleanupNeeded, availableImages, downloading, supervisorNetworkReady, delta) =>
conf = { delta, localMode }
if localMode
conf = _.mapValues({ delta, localMode }, (v) -> checkTruthy(v))
if conf.localMode
cleanupNeeded = false
@_inferNextSteps(cleanupNeeded, availableImages, downloading, supervisorNetworkReady, currentState, targetState, ignoreImages, conf)
.then (nextSteps) =>