* Parse output of post-processing step (whether Wizer or Weval) * * @param {Stream} stderr * @returns {string} String that can be printed to describe error output
(stderr)
| 470 | * @returns {string} String that can be printed to describe error output |
| 471 | */ |
| 472 | function parseWizerStderr(stderr) { |
| 473 | let output = `${stderr}`; |
| 474 | let causeStart = output.indexOf(WIZER_ERROR_CAUSE_PREFIX); |
| 475 | let exitCodeStart = output.indexOf(WIZER_EXIT_CODE_PREFIX); |
| 476 | if (causeStart === -1 || exitCodeStart === -1) { |
| 477 | return output; |
| 478 | } |
| 479 | |
| 480 | let causeEnd = output.indexOf('\n', exitCodeStart + 1); |
| 481 | return `${output.substring(0, causeStart)}${output.substring(causeEnd)}`.trim(); |
| 482 | } |
| 483 | |
| 484 | /** |
| 485 | * Check whether a value is numeric (including BigInt) |