MCPcopy Index your code
hub / github.com/codeaashu/claude-code / probePath

Function probePath

src/utils/shell/powershellDetection.ts:5–11  ·  view source on GitHub ↗
(p: string)

Source from the content-addressed store, hash-verified

3import { which } from '../which.js'
4
5async function probePath(p: string): Promise<string | null> {
6 try {
7 return (await stat(p)).isFile() ? p : null
8 } catch {
9 return null
10 }
11}
12
13/**
14 * 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