Use __dirname to make sure the relative path is relative to where we expect.

This commit is contained in:
Page 2014-05-02 16:56:30 +01:00 committed by Pablo Carranza Vélez
parent 791cbda490
commit 5d89b74bab

View File

@ -19,7 +19,7 @@ exports.getDeviceUuid = ->
# Parses package.json and returns resin-supervisor's version
exports.getSupervisorVersion = ->
fs.readFileAsync '../package.json', 'utf-8'
fs.readFileAsync(__dirname + '/../package.json', 'utf-8')
.then (data) ->
obj = JSON.parse data
return obj.version