Merge pull request #89 from resin-io/fix-os-version-reporting

Quickfix: use String .split instead of _.split when getting Host OS version
This commit is contained in:
Pablo Carranza Vélez 2016-01-26 21:09:23 -03:00
commit 8e4d5783e5

View File

@ -181,10 +181,10 @@ exports.updateState = do ->
exports.getOSVersion = ->
fs.readFileAsync(config.hostOsVersionPath)
.then (releaseData) ->
lines = _.split(releaseData, "\n")
lines = releaseData.split("\n")
releaseItems = {}
for line in lines
[ key, val ] = _.split(line, '=')
[ key, val ] = line.split('=')
releaseItems[_.trim(key)] = _.trim(val)
return releaseItems['PRETTY_NAME']
.catch (err) ->