Skip to content

Commit

Permalink
feat(starter): resolve start api usage with a handle to the spawned p…
Browse files Browse the repository at this point in the history
…rocess
  • Loading branch information
anulman authored and MarshallOfSound committed Jan 31, 2017
1 parent 06b824e commit b5ba30e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/api/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,17 @@ export default async (providedOptions = {}) => {
ELECTRON_ENABLE_STACK_DUMPING: true,
} : {}),
};

let spawned;

await asyncOra('Launching Application', async () => {
/* istanbul ignore if */
if (process.platform === 'win32') {
spawn(path.resolve(dir, 'node_modules/.bin/electron.cmd'), ['.'].concat(args), spawnOpts);
spawned = spawn(path.resolve(dir, 'node_modules/.bin/electron.cmd'), ['.'].concat(args), spawnOpts);
} else {
spawn(path.resolve(dir, 'node_modules/.bin/electron'), ['.'].concat(args), spawnOpts);
spawned = spawn(path.resolve(dir, 'node_modules/.bin/electron'), ['.'].concat(args), spawnOpts);
}
});

return spawned;
};

0 comments on commit b5ba30e

Please sign in to comment.