electron/script/start.js
Shelley Vohr 000be5d1d4
chore: refactor scripts for octokit update (#16284)
* chore: refactor scripts for octokit

* update release script

* update more octokit scripts

* cleanup

* remove unecessary refactor

* fixup package lock
2019-01-08 12:05:58 -08:00

16 lines
462 B
JavaScript

const cp = require('child_process')
const utils = require('./lib/utils')
const electronPath = utils.getAbsoluteElectronExec()
const child = cp.spawn(electronPath, process.argv.slice(2), { stdio: 'inherit' })
child.on('close', (code) => process.exit(code))
const handleTerminationSignal = (signal) =>
process.on(signal, () => {
if (!child.killed) {
child.kill(signal)
}
})
handleTerminationSignal('SIGINT')
handleTerminationSignal('SIGTERM')