(args: string[])
| 45 | |
| 46 | |
| 47 | function formatArgs(args: string[]): string { |
| 48 | return args |
| 49 | .map((part, index) => { |
| 50 | if (!part) { |
| 51 | return ''; |
| 52 | } |
| 53 | const hasNewlines = part.includes('\n'); |
| 54 | const isLong = part.length > 120; |
| 55 | if (hasNewlines || isLong) { |
| 56 | return `<arg-${index}:${part.length} chars>`; |
| 57 | } |
| 58 | return part; |
| 59 | }) |
| 60 | .join(' '); |
| 61 | } |
| 62 | |
| 63 | async function loadPtySpawn(): Promise<PtySpawn | null> { |
| 64 | if (cachedPtySpawn) { |
no outgoing calls
no test coverage detected