MCPcopy Create free account
hub / github.com/backnotprop/plannotator / shouldSpawnViaShell

Function shouldSpawnViaShell

packages/ai/providers/command-path.ts:63–70  ·  view source on GitHub ↗
(
	commandPath: string,
	platform: Platform = process.platform,
)

Source from the content-addressed store, hash-verified

61}
62
63export function shouldSpawnViaShell(
64 commandPath: string,
65 platform: Platform = process.platform,
66): boolean {
67 if (platform !== "win32") return false;
68 const ext = getKnownWindowsExtension(commandPath);
69 return ext ? WINDOWS_SHELL_EXTENSIONS.has(ext) : false;
70}
71
72function quoteWindowsShellArg(arg: string): string {
73 if (!arg || /[\s"&()^|<>]/.test(arg)) {

Callers 2

ai.test.tsFile · 0.90

Calls 2

getKnownWindowsExtensionFunction · 0.85
hasMethod · 0.80

Tested by

no test coverage detected