(toolName: string)
| 90 | } |
| 91 | |
| 92 | export function createParserDebugCapture(toolName: string): ParserDebugCapture { |
| 93 | const lines: string[] = []; |
| 94 | |
| 95 | return { |
| 96 | addUnrecognizedLine(line: string): void { |
| 97 | lines.push(line); |
| 98 | }, |
| 99 | get count(): number { |
| 100 | return lines.length; |
| 101 | }, |
| 102 | flush(): string | null { |
| 103 | if (lines.length === 0) return null; |
| 104 | const logDir = resolveWritableLogDir(); |
| 105 | scheduleArtifactCreatedSweep(logDir); |
| 106 | const debugPath = path.join(logDir.path, generateLogFileName(`${toolName}_parser-debug`)); |
| 107 | fs.writeFileSync( |
| 108 | debugPath, |
| 109 | `Unrecognized xcodebuild output lines (${lines.length}):\n\n${lines.join('\n')}\n`, |
| 110 | { flag: 'wx' }, |
| 111 | ); |
| 112 | return debugPath; |
| 113 | }, |
| 114 | }; |
| 115 | } |
no outgoing calls
no test coverage detected