(url: string, options: OpenBrowserOptions = {})
| 65 | * - otherwise: fall back to the `open` package (default browser) |
| 66 | */ |
| 67 | export 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 | } |
nothing calls this directly
no test coverage detected