11 lines
323 B
JavaScript
11 lines
323 B
JavaScript
|
const { app, utilityProcess } = require('electron');
|
||
|
const path = require('path');
|
||
|
|
||
|
app.whenReady().then(() => {
|
||
|
const payload = app.commandLine.getSwitchValue('payload');
|
||
|
const child = utilityProcess.fork(path.join(__dirname, 'test.js'), [`--payload=${payload}`]);
|
||
|
child.on('exit', () => {
|
||
|
app.quit();
|
||
|
});
|
||
|
});
|