(command, args)
| 328 | } |
| 329 | |
| 330 | function run(command, args) { |
| 331 | const result = spawnSync(command, args, { |
| 332 | encoding: "utf8", |
| 333 | timeout: 300_000, |
| 334 | maxBuffer: 1024 * 1024 * 4, |
| 335 | }); |
| 336 | if (result.error) { |
| 337 | throw result.error; |
| 338 | } |
| 339 | if (result.status !== 0) { |
| 340 | throw new Error( |
| 341 | `${command} ${args.join(" ")} failed with status ${result.status}: ${[ |
| 342 | result.stderr, |
| 343 | result.stdout, |
| 344 | ] |
| 345 | .filter(Boolean) |
| 346 | .join("\n")}`, |
| 347 | ); |
| 348 | } |
| 349 | return result; |
| 350 | } |
no outgoing calls
no test coverage detected