MCPcopy Create free account
hub / github.com/NanmiCoder/cc-haha / isPowerShellExecutablePath

Function isPowerShellExecutablePath

src/utils/shell/powershellDetection.ts:30–33  ·  view source on GitHub ↗
(candidate: string)

Source from the content-addressed store, hash-verified

28}
29
30export function isPowerShellExecutablePath(candidate: string): boolean {
31 const basename = basenameWithoutExe(candidate)
32 return basename === 'pwsh' || basename === 'powershell'
33}
34
35function hasPathSeparator(candidate: string): boolean {
36 return candidate.includes('/') || candidate.includes('\\')

Calls 1

basenameWithoutExeFunction · 0.85

Tested by

no test coverage detected