diff --git a/src/config/functions.ts b/src/config/functions.ts index b777fe05..6bf85c5a 100644 --- a/src/config/functions.ts +++ b/src/config/functions.ts @@ -45,7 +45,7 @@ export const fnSchema = { // FIXME: We should be mounting the following file into the supervisor from the // start-resin-supervisor script, changed in meta-resin - but until then, hardcode it const data = await fs.readFile( - `${constants.bootMountPoint}/device-type.json`, + `${constants.rootMountPoint}${constants.bootMountPoint}/device-type.json`, 'utf8', ); const deviceInfo = JSON.parse(data); @@ -64,7 +64,7 @@ export const fnSchema = { // FIXME: We should be mounting the following file into the supervisor from the // start-resin-supervisor script, changed in meta-resin - but until then, hardcode it const data = await fs.readFile( - `${constants.bootMountPoint}/device-type.json`, + `${constants.rootMountPoint}${constants.bootMountPoint}/device-type.json`, 'utf8', ); const deviceInfo = JSON.parse(data); diff --git a/test/03-config.spec.ts b/test/03-config.spec.ts index ab9aec46..7a985239 100644 --- a/test/03-config.spec.ts +++ b/test/03-config.spec.ts @@ -151,7 +151,7 @@ describe('Config', () => { expect(deviceArch).to.equal(arch); expect(fs.readFile).to.be.calledOnce; expect(fs.readFile).to.be.calledWith( - `${constants.bootMountPoint}/device-type.json`, + `${constants.rootMountPoint}${constants.bootMountPoint}/device-type.json`, 'utf8', ); @@ -171,7 +171,7 @@ describe('Config', () => { expect(deviceType).to.equal(slug); expect(fs.readFile).to.be.calledOnce; expect(fs.readFile).to.be.calledWith( - `${constants.bootMountPoint}/device-type.json`, + `${constants.rootMountPoint}${constants.bootMountPoint}/device-type.json`, 'utf8', );