(url: string)
| 59 | } |
| 60 | |
| 61 | function 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 | |
| 69 | async function openBrowserWhenReady(url: string, timeoutMs = 120_000): Promise<void> { |
| 70 | const start = Date.now(); |
no outgoing calls
no test coverage detected