* Spawn a command asynchronously, _always_ inheriting stdio. * @param {import("tinyexec").Output} spawned
(spawned)
| 197 | * @param {import("tinyexec").Output} spawned |
| 198 | */ |
| 199 | function wrapError(spawned) { |
| 200 | return spawned.catch((err) => { |
| 201 | // ensure exit code is always a number |
| 202 | err.exitCode = getExitCode(err); |
| 203 | |
| 204 | console.error('SPAWN PROCESS ERROR'); |
| 205 | throw err; |
| 206 | }); |
| 207 | } |
no test coverage detected