MCPcopy Create free account
hub / github.com/MigoXLab/coderio / normalizeExecutable

Function normalizeExecutable

src/tools/launch-tool/utils/dev-server-manager.ts:32–41  ·  view source on GitHub ↗
(executable: string)

Source from the content-addressed store, hash-verified

30}
31
32function normalizeExecutable(executable: string): string {
33 if (process.platform !== 'win32') {
34 return executable;
35 }
36 const lower = executable.toLowerCase();
37 if (lower === 'npm' || lower === 'pnpm' || lower === 'yarn' || lower === 'npx') {
38 return `${lower}.cmd`;
39 }
40 return executable;
41}
42
43function parseCommandWithPortSupport(commandStr: string): { executable: string; args: string[]; needsDoubleDash: boolean } {
44 const parts = commandStr.trim().split(/\s+/);

Callers 1

startMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected