electron/spec/fixtures/api/utility-process/inherit-stderr/main.js
Milan Burda d78f37ec8f
refactor: use node scheme imports in spec (#38487)
Co-authored-by: Milan Burda <miburda@microsoft.com>
2023-06-15 10:42:27 -04:00

10 lines
328 B
JavaScript

const { app, utilityProcess } = require('electron');
const path = require('node: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();
});
});