Files
Andrew BradleyandGitHub 7f6b241c72 Wider print width (#2012)
* increase formatting print-width to 120; 80 hurts legibility of TS too much

* apply formatting

* fix
2023-05-07 18:11:57 -04:00

15 lines
500 B
TypeScript

import { fork } from 'child_process';
// Type syntax to prove its compiled, though the import above should also
// prove the same
const a = null as any;
console.log(JSON.stringify({ execArgv: process.execArgv, argv: process.argv }));
if (process.env.generation !== 'grandchild') {
const nextGeneration = process.env.generation === 'child' ? 'grandchild' : 'child';
fork(__filename, process.argv.slice(2), {
env: { ...process.env, generation: nextGeneration },
stdio: 'inherit',
});
}