| 33 | // * `exit` The callback {Function} which receives a single argument |
| 34 | // containing the exit status (optional). |
| 35 | constructor({ command, args, options = {}, stdout, stderr, exit }) { |
| 36 | options.env = options.env || Object.create(process.env); |
| 37 | options.env.ELECTRON_RUN_AS_NODE = 1; |
| 38 | options.env.ELECTRON_NO_ATTACH_CONSOLE = 1; |
| 39 | |
| 40 | args = args ? args.slice() : []; |
| 41 | args.unshift(command); |
| 42 | args.unshift('--no-deprecation'); |
| 43 | |
| 44 | super({ |
| 45 | command: process.execPath, |
| 46 | args, |
| 47 | options, |
| 48 | stdout, |
| 49 | stderr, |
| 50 | exit |
| 51 | }); |
| 52 | } |
| 53 | }; |