Skip to content
Permalink
Browse files

feat(starter): resolve start api usage with a handle to the spawned p…

…rocess
  • Loading branch information
anulman authored and MarshallOfSound committed Jan 31, 2017
1 parent 06b824e commit b5ba30e37cf17fc3a8e4ba457bb1eea0844c3140
Showing with 7 additions and 2 deletions.
  1. +7 −2 src/api/start.js
@@ -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.
You can’t perform that action at this time.