index.js 362 B

1234567891011
  1. var fs = require('fs')
  2. var path = require('path')
  3. var pathFile = path.join(__dirname, 'path.txt')
  4. if (fs.existsSync(pathFile)) {
  5. module.exports = path.join(__dirname, fs.readFileSync(pathFile, 'utf-8'))
  6. } else {
  7. throw new Error('Electron failed to install correctly, please delete node_modules/' + path.basename(__dirname) + ' and try installing again')
  8. }