(dir: string)
| 188 | * shut down clean previously. |
| 189 | */ |
| 190 | export async function clearBridgePointer(dir: string): Promise<void> { |
| 191 | const path = getBridgePointerPath(dir) |
| 192 | try { |
| 193 | await unlink(path) |
| 194 | logForDebugging(`[bridge:pointer] cleared ${path}`) |
| 195 | } catch (err: unknown) { |
| 196 | if (!isENOENT(err)) { |
| 197 | logForDebugging(`[bridge:pointer] clear failed: ${err}`, { |
| 198 | level: 'warn', |
| 199 | }) |
| 200 | } |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | function safeJsonParse(raw: string): unknown { |
| 205 | try { |
no test coverage detected