Skip to content
Permalink
Browse files

fix(core): wait for overrideStartLogic before attempting to resolve t…

…he location of the Electron mod

ISSUES CLOSED: 531
  • Loading branch information
MarshallOfSound committed Jul 13, 2018
1 parent 91ede6f commit 7e74206dc11f589e4389fccdb46642587f6cb865
Showing with 5 additions and 1 deletion.
  1. +5 −1 packages/api/core/src/api/start.ts
@@ -57,7 +57,7 @@ export default async ({
};

const forgeSpawn = async () => {
let electronExecPath = require(path.resolve(dir, 'node_modules/electron'));
let electronExecPath: string | null = null;

// If a plugin has taken over the start command let's stop here
const spawnedPluginChild = await forgeConfig.pluginInterface.overrideStartLogic({
@@ -80,6 +80,10 @@ export default async ({
return spawnedPluginChild;
}

if (!electronExecPath) {
electronExecPath = require(path.resolve(dir, 'node_modules/electron'));
}

const spawnOpts = {
cwd: dir,
stdio: 'inherit',

0 comments on commit 7e74206

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