mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-21 06:33:30 +00:00
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:
commit
8e4d5783e5
@ -181,10 +181,10 @@ exports.updateState = do ->
|
|||||||
exports.getOSVersion = ->
|
exports.getOSVersion = ->
|
||||||
fs.readFileAsync(config.hostOsVersionPath)
|
fs.readFileAsync(config.hostOsVersionPath)
|
||||||
.then (releaseData) ->
|
.then (releaseData) ->
|
||||||
lines = _.split(releaseData, "\n")
|
lines = releaseData.split("\n")
|
||||||
releaseItems = {}
|
releaseItems = {}
|
||||||
for line in lines
|
for line in lines
|
||||||
[ key, val ] = _.split(line, '=')
|
[ key, val ] = line.split('=')
|
||||||
releaseItems[_.trim(key)] = _.trim(val)
|
releaseItems[_.trim(key)] = _.trim(val)
|
||||||
return releaseItems['PRETTY_NAME']
|
return releaseItems['PRETTY_NAME']
|
||||||
.catch (err) ->
|
.catch (err) ->
|
||||||
|
Loading…
Reference in New Issue
Block a user