(spawnOptions: SpawnOptions)
| 25 | } |
| 26 | |
| 27 | export function run(spawnOptions: SpawnOptions) { |
| 28 | try { |
| 29 | // eslint-disable-next-line no-sync |
| 30 | const stats = Fs.statSync(binaryPath) |
| 31 | if (!stats.isFile()) { |
| 32 | return null |
| 33 | } |
| 34 | } catch (e) { |
| 35 | return null |
| 36 | } |
| 37 | |
| 38 | const opts = Object.assign({}, spawnOptions) |
| 39 | |
| 40 | opts.env = Object.assign(opts.env || {}, process.env, { |
| 41 | NODE_ENV: 'development', |
| 42 | }) |
| 43 | |
| 44 | return spawn(binaryPath, [], opts) |
| 45 | } |