MCPcopy Create free account
hub / github.com/garrytan/gstack / findExecutable

Function findExecutable

make-pdf/src/browseClient.ts:89–98  ·  view source on GitHub ↗
(base: string)

Source from the content-addressed store, hash-verified

87 * fails on win32, try .exe / .cmd / .bat. Linux/macOS behavior is unchanged.
88 */
89export function findExecutable(base: string): string | null {
90 if (isExecutable(base)) return base;
91 if (process.platform === "win32") {
92 for (const ext of [".exe", ".cmd", ".bat"]) {
93 const withExt = base + ext;
94 if (isExecutable(withExt)) return withExt;
95 }
96 }
97 return null;
98}
99
100/**
101 * Locate the browse binary. Throws a BrowseClientError with a

Callers 3

resolveOverrideFunction · 0.70
resolveBrowseBinFunction · 0.70

Calls 1

isExecutableFunction · 0.70

Tested by

no test coverage detected