When applying host config values like dtoverlay and dtparam, take values not starting with double quotes as single entries instead of arrays to parse

Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
This commit is contained in:
Pablo Carranza Velez 2017-12-19 04:11:16 -05:00
parent 918372b569
commit d84bcf0fb4

View File

@ -208,6 +208,9 @@ module.exports = class DeviceConfig
key.replace(configRegex(), '$2')
parsedEnv = _.mapValues parsedEnv, (val, key) ->
if _.includes(arrayConfigKeys, key)
if !_.startsWith(val, '"')
return [ val ]
else
return JSON.parse("[#{val}]")
else
return val