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

Function resolveWindowsCommand

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

Source from the content-addressed store, hash-verified

52 * fails.
53 */
54export function resolveWindowsCommand(
55 command,
56 platform = process.platform,
57 lookup = whereCommandLookup,
58) {
59 if (platform !== "win32") {
60 return command;
61 }
62 if (command.includes("/") || command.includes("\\")) {
63 return command;
64 }
65 return lookup(command) || command;
66}
67
68function whereCommandLookup(command) {
69 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