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

Function openBrowser

packages/cli/src/utils/openBrowser.ts:67–80  ·  view source on GitHub ↗
(url: string, options: OpenBrowserOptions = {})

Source from the content-addressed store, hash-verified

65 * - otherwise: fall back to the `open` package (default browser)
66 */
67export function openBrowser(url: string, options: OpenBrowserOptions = {}): void {
68 if (options.browserPath) {
69 const args = buildBrowserArgs(url, options);
70 const child = spawn(options.browserPath, args, {
71 detached: true,
72 stdio: "ignore",
73 });
74 child.on("error", () => {});
75 child.unref();
76 return;
77 }
78
79 import("open").then((mod) => mod.default(url)).catch(() => {});
80}

Callers

nothing calls this directly

Calls 3

buildBrowserArgsFunction · 0.85
onMethod · 0.65
spawnFunction · 0.50

Tested by

no test coverage detected