Skip to content
Permalink
Browse files

fix(starter): fix launching on newest yarn

  • Loading branch information
MarshallOfSound committed Dec 11, 2016
1 parent 7f13a30 commit 8c5bc65694c10dbe6993272fa946248cd3700ad2
Showing with 7 additions and 2 deletions.
  1. +7 −2 src/electron-forge-start.js
@@ -37,14 +37,19 @@ const main = async () => {
const packageJSON = JSON.parse(await fs.readFile(path.resolve(dir, 'package.json'), 'utf8'));

await rebuild(dir, packageJSON.devDependencies['electron-prebuilt-compile'], process.platform, process.arch);
spawn(process.execPath, [path.resolve(dir, 'node_modules/.bin/electron'), '.'].concat(process.argv.slice(2)), {
const spawnOpts = {
cwd: dir,
stdio: 'inherit',
env: Object.assign({}, process.env, program.enableLogging ? {
ELECTRON_ENABLE_LOGGING: true,
ELECTRON_ENABLE_STACK_DUMPING: true,
} : {}),
});
};
if (process.platform === 'win32') {
spawn(path.resolve(dir, 'node_modules/.bin/electron.cmd'), ['.'].concat(process.argv.slice(2)), spawnOpts);
} else {
spawn(path.resolve(dir, 'node_modules/.bin/electron'), ['.'].concat(process.argv.slice(2)), spawnOpts);
}

startSpinner.succeed();
};

0 comments on commit 8c5bc65

Please sign in to comment.
You can’t perform that action at this time.