MCPcopy Create free account
hub / github.com/sourcebot-dev/sourcebot / openBrowser

Function openBrowser

packages/setupWizard/src/index.ts:61–67  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

59}
60
61function openBrowser(url: string): void {
62 const cmd = process.platform === 'darwin' ? 'open'
63 : process.platform === 'win32' ? 'cmd'
64 : 'xdg-open';
65 const args = process.platform === 'win32' ? ['/c', 'start', '""', url] : [url];
66 spawn(cmd, args, { stdio: 'ignore', detached: true }).unref();
67}
68
69async function openBrowserWhenReady(url: string, timeoutMs = 120_000): Promise<void> {
70 const start = Date.now();

Callers 1

openBrowserWhenReadyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected