MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / resolveWindowsCommand

Function resolveWindowsCommand

scripts/dev-process-utils.mjs:49–61  ·  view source on GitHub ↗
(
  command,
  platform = process.platform,
  lookup = whereCommandLookup,
)

Source from the content-addressed store, hash-verified

47 * fails.
48 */
49export function resolveWindowsCommand(
50 command,
51 platform = process.platform,
52 lookup = whereCommandLookup,
53) {
54 if (platform !== "win32") {
55 return command;
56 }
57 if (command.includes("/") || command.includes("\\")) {
58 return command;
59 }
60 return lookup(command) || command;
61}
62
63function whereCommandLookup(command) {
64 const result = spawnSync("where.exe", [command], { encoding: "utf8" });

Callers 3

spawnServiceFunction · 0.90
spawnServiceFunction · 0.90

Calls 1

lookupFunction · 0.85

Tested by

no test coverage detected