()
| 83 | }; |
| 84 | |
| 85 | export const getUrlOpenCommand = (): string => { |
| 86 | // --- Determine the OS-specific command to open URLs --- |
| 87 | let openCmd: string; |
| 88 | switch (process.platform) { |
| 89 | case 'darwin': |
| 90 | openCmd = 'open'; |
| 91 | break; |
| 92 | case 'win32': |
| 93 | openCmd = 'start'; |
| 94 | break; |
| 95 | case 'linux': |
| 96 | openCmd = 'xdg-open'; |
| 97 | break; |
| 98 | default: |
| 99 | // Default to xdg-open, which appears to be supported for the less popular operating systems. |
| 100 | openCmd = 'xdg-open'; |
| 101 | console.warn( |
| 102 | `Unknown platform: ${process.platform}. Attempting to open URLs with: ${openCmd}.`, |
| 103 | ); |
| 104 | break; |
| 105 | } |
| 106 | return openCmd; |
| 107 | }; |
no outgoing calls
no test coverage detected