(command, args, options = {})
| 310 | } |
| 311 | |
| 312 | function runText(command, args, options = {}) { |
| 313 | const result = spawnSync(command, args, { |
| 314 | cwd: options.cwd ?? root, |
| 315 | encoding: "utf8", |
| 316 | timeout: options.timeoutMs ?? 30_000, |
| 317 | }); |
| 318 | if (result.status !== 0) { |
| 319 | throw new Error( |
| 320 | `${command} ${args.join(" ")} failed with ${result.status ?? result.signal}\n${result.stdout}\n${result.stderr}\n${result.error?.message ?? ""}`, |
| 321 | ); |
| 322 | } |
| 323 | return result.stdout; |
| 324 | } |
| 325 | |
| 326 | function runNodeScript(script, args, env) { |
| 327 | const result = spawnSync( |
no outgoing calls
no test coverage detected