MCPcopy Create free account
hub / github.com/Snapchat/Valdi / isPipeAvailable

Function isPipeAvailable

valdi/vscode_debugger/src/targets/node/bootloader.ts:121–133  ·  view source on GitHub ↗
(pipe?: string)

Source from the content-addressed store, hash-verified

119}
120
121function 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.

Callers 1

inspectOrQueueFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected