Function
shellOutput
(command: string, raw: string)
Source from the content-addressed store, hash-verified
| 1405 | } |
| 1406 | |
| 1407 | function shellOutput(command: string, raw: string): string | undefined { |
| 1408 | const body = stripAnsi(raw).replace(/^\n+/, "").replace(/\n+$/, "") |
| 1409 | if (!body) { |
| 1410 | return undefined |
| 1411 | } |
| 1412 | |
| 1413 | if (!command) { |
| 1414 | return body |
| 1415 | } |
| 1416 | |
| 1417 | return `\n${body}` |
| 1418 | } |
| 1419 | |
| 1420 | export function toolEntryBody(commit: StreamCommit, raw: string): RunEntryBody | undefined { |
| 1421 | if (commit.shell) { |
Tested by
no test coverage detected