(url: string)
| 1 | import { execFile } from 'node:child_process'; |
| 2 | |
| 3 | export function openUrl(url: string): void { |
| 4 | const command: [string, string[]] = |
| 5 | process.platform === 'darwin' |
| 6 | ? ['open', [url]] |
| 7 | : process.platform === 'win32' |
| 8 | ? ['cmd', ['/c', 'start', '', url]] |
| 9 | : ['xdg-open', [url]]; |
| 10 | execFile(command[0], command[1], () => {}); |
| 11 | } |
no outgoing calls
no test coverage detected