mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-18 17:00:25 +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
|
||||
exports.getSupervisorVersion = ->
|
||||
fs.readFileAsync '../package.json'
|
||||
fs.readFileAsync '../package.json', 'utf-8'
|
||||
.then (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