MCPcopy Create free account
hub / github.com/anus-dev/ANUS / getUrlOpenCommand

Function getUrlOpenCommand

packages/cli/src/ui/utils/commandUtils.ts:85–107  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

83};
84
85export 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};

Callers 2

getOpenUrlsCommandsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected