(pipe?: string)
| 119 | } |
| 120 | |
| 121 | function isPipeAvailable(pipe?: string): pipe is string { |
| 122 | if (!pipe) { |
| 123 | return false; |
| 124 | } |
| 125 | |
| 126 | try { |
| 127 | // normally we'd use l/stat, but doing so with pipes on windows actually |
| 128 | // triggers a 'connection', so do this instead... |
| 129 | return fs.readdirSync(path.dirname(pipe)).includes(path.basename(pipe)); |
| 130 | } catch (e) { |
| 131 | return false; |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | /** |
| 136 | * Adds process telemetry to the debugger file if necessary. |