MCPcopy
hub / github.com/openclaw/clawsweeper / resolveCommand

Function resolveCommand

src/command.ts:35–43  ·  view source on GitHub ↗
(command: string, args: string[])

Source from the content-addressed store, hash-verified

33}
34
35function resolveCommand(command: string, args: string[]): { command: string; args: string[] } {
36 if (command === "gh" && process.env.GH_BIN) {
37 return {
38 command: process.env.GH_BIN,
39 args: [...envArgs("GH_BIN_ARGS"), ...args],
40 };
41 }
42 return { command: resolveExecutable(command), args };
43}
44
45function resolveExecutable(command: string): string {
46 return command === "git" ? (process.env.GIT_BIN ?? "/usr/bin/git") : command;

Callers 1

runTextFunction · 0.85

Calls 2

resolveExecutableFunction · 0.85
envArgsFunction · 0.70

Tested by

no test coverage detected