MCPcopy Create free account
hub / github.com/IgorWarzocha/howcode / getOpenCommand

Function getOpenCommand

desktop/system-open-path.ts:4–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2import process from 'node:process'
3
4function getOpenCommand() {
5 if (process.platform === 'darwin') {
6 return { command: 'open', args: [] }
7 }
8
9 if (process.platform === 'win32') {
10 return { command: 'rundll32.exe', args: ['url.dll,FileProtocolHandler'] }
11 }
12
13 return { command: 'xdg-open', args: [] }
14}
15
16export async function openPathWithSystem(targetPath: string) {
17 const { command, args } = getOpenCommand()

Callers 1

openPathWithSystemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected