MCPcopy
hub / github.com/ValueCell-ai/ClawX / quoteForCmd

Function quoteForCmd

electron/utils/win-shell.ts:22–27  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

20 * unchanged so this function can be called unconditionally.
21 */
22export function quoteForCmd(value: string): string {
23 if (process.platform !== 'win32') return value;
24 if (!value.includes(' ')) return value;
25 if (value.startsWith('"') && value.endsWith('"')) return value;
26 return `"${value}"`;
27}
28
29/**
30 * Determine whether a spawn call needs `shell: true` on Windows.

Callers 5

isPythonReadyFunction · 0.85
runPythonInstallFunction · 0.85
setupManagedPythonFunction · 0.85
prepareWinSpawnFunction · 0.85
win-shell.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected