MCPcopy
hub / github.com/coder/mux / toWindowsPath

Function toWindowsPath

src/node/utils/paths.ts:30–37  ·  view source on GitHub ↗
(msysPath: string)

Source from the content-addressed store, hash-verified

28 * a context that runs under cmd.exe (e.g., SSH ProxyCommand).
29 */
30export function toWindowsPath(msysPath: string): string {
31 // Match MSYS drive-letter convention: /c/Users/... → C:\Users\...
32 const match = /^\/([a-zA-Z])\/(.*)$/.exec(msysPath);
33 if (!match) return msysPath;
34 const drive = match[1].toUpperCase();
35 const rest = match[2].replaceAll("/", "\\");
36 return `${drive}:\\${rest}`;
37}

Callers 2

paths.test.tsFile · 0.90

Calls 1

execMethod · 0.65

Tested by

no test coverage detected