mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-22 18:22:41 +00:00
Merge pull request #775 from resin-io/fix-apibinder-config-typo
fix: Properly get the config from target state before comparing durin…
This commit is contained in:
commit
9996e20f17
@ -316,13 +316,12 @@ module.exports = class APIBinder
|
|||||||
_reportInitialEnv: (apiEndpoint) =>
|
_reportInitialEnv: (apiEndpoint) =>
|
||||||
Promise.join(
|
Promise.join(
|
||||||
@deviceState.getCurrentForComparison()
|
@deviceState.getCurrentForComparison()
|
||||||
@getTargetState().then (conf) =>
|
@getTargetState().then (targetState) =>
|
||||||
@deviceState.deviceConfig.formatConfigKeys(conf)
|
@deviceState.deviceConfig.formatConfigKeys(targetState.local.config)
|
||||||
@deviceState.deviceConfig.getDefaults()
|
@deviceState.deviceConfig.getDefaults()
|
||||||
@config.get('deviceId')
|
@config.get('deviceId')
|
||||||
(currentState, targetState, defaultConfig, deviceId) =>
|
(currentState, targetConfig, defaultConfig, deviceId) =>
|
||||||
currentConfig = currentState.local.config
|
currentConfig = currentState.local.config
|
||||||
targetConfig = targetState.local.config
|
|
||||||
Promise.mapSeries _.toPairs(currentConfig), ([ key, value ]) =>
|
Promise.mapSeries _.toPairs(currentConfig), ([ key, value ]) =>
|
||||||
# We never want to disable VPN if, for instance, it failed to start so far
|
# We never want to disable VPN if, for instance, it failed to start so far
|
||||||
if key == 'SUPERVISOR_VPN_CONTROL'
|
if key == 'SUPERVISOR_VPN_CONTROL'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user