MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / probePath

Function probePath

source code/utils/shell/powershellDetection.ts:7–13  ·  view source on GitHub ↗
(p: string)

Source from the content-addressed store, hash-verified

5import { which } from '../which.js'
6
7async function probePath(p: string): Promise<string | null> {
8 try {
9 return (await stat(p)).isFile() ? p : null
10 } catch {
11 return null
12 }
13}
14
15/**
16 * Attempts to find PowerShell on the system via PATH.

Callers 1

findPowerShellFunction · 0.85

Calls 1

statFunction · 0.85

Tested by

no test coverage detected