read utf-8 data. fixed Promises bug

This commit is contained in:
Vasilis Souleles 2014-04-29 10:29:10 +03:00 committed by Pablo Carranza Vélez
parent 10451fd27d
commit a51a648267

View File

@ -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