mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-05-13 22:32:57 +00:00
read utf-8 data. fixed Promises bug
This commit is contained in:
parent
10451fd27d
commit
a51a648267
@ -19,10 +19,7 @@ exports.getDeviceUuid = ->
|
|||||||
|
|
||||||
# Parses package.json and returns resin-supervisor's version
|
# Parses package.json and returns resin-supervisor's version
|
||||||
exports.getSupervisorVersion = ->
|
exports.getSupervisorVersion = ->
|
||||||
fs.readFileAsync '../package.json'
|
fs.readFileAsync '../package.json', 'utf-8'
|
||||||
.then (data) ->
|
.then (data) ->
|
||||||
obj = JSON.parse data
|
obj = JSON.parse data
|
||||||
|
|
||||||
Promise.resolve obj
|
|
||||||
.then (obj) ->
|
|
||||||
return obj.version
|
return obj.version
|
||||||
|
Loading…
x
Reference in New Issue
Block a user