(sessionName: string, serviceName: string)
| 142 | if (isLogFilterRunning(logPath)) return; |
| 143 | // `pipe-pane -o` is a no-op while tmux still thinks a pipe exists, including |
| 144 | // after the filter process has exited. Close first, then attach a new one. |
| 145 | closePipePane(sessionName, pane.windowIndex, pane.paneIndex); |
| 146 | pipePane(sessionName, pane.windowIndex, pane.paneIndex, buildLogPipeCommand(logPath)); |
| 147 | } |
| 148 | |
| 149 | /** Re-attach `pipe-pane` for any known service whose log filter is not running. */ |
| 150 | export function ensureDeadServiceLogPipes(sessionName: string, serviceNames: string[]): string[] { |
| 151 | const repaired: string[] = []; |
| 152 | for (const name of serviceNames) { |
| 153 | const logPath = path.join(findRepoRoot(), 'dev', 'logs', `${name}.log`); |
| 154 | if (isLogFilterRunning(logPath)) continue; |
| 155 | try { |
| 156 | ensureServiceLogPipe(sessionName, name); |
no test coverage detected