MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / whichBinary

Function whichBinary

packages/cli/src/browser/manager.ts:59–75  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

57 ];
58
59function whichBinary(name: string): string | undefined {
60 try {
61 const cmd = process.platform === "win32" ? `where ${name}` : `which ${name}`;
62 const output = execSync(cmd, {
63 encoding: "utf-8",
64 stdio: ["pipe", "pipe", "pipe"],
65 timeout: 5000,
66 });
67 const first = output
68 .split(/\r?\n/)
69 .map((s) => s.trim())
70 .find(Boolean);
71 return first || undefined;
72 } catch {
73 return undefined;
74 }
75}
76
77function findFromEnv(): BrowserResult | undefined {
78 const envPath = process.env["HYPERFRAMES_BROWSER_PATH"];

Callers 1

findFromSystemFunction · 0.70

Calls 1

findMethod · 0.65

Tested by

no test coverage detected