MCPcopy Create free account
hub / github.com/ResearAI/DeepScientist / candidateWrapperPathsForCommand

Function candidateWrapperPathsForCommand

bin/ds.js:1980–1993  ·  view source on GitHub ↗
(commandName)

Source from the content-addressed store, hash-verified

1978}
1979
1980function candidateWrapperPathsForCommand(commandName) {
1981 const directories = String(process.env.PATH || '')
1982 .split(path.delimiter)
1983 .filter(Boolean);
1984 const candidates = [];
1985 for (const directory of directories) {
1986 candidates.push(path.join(directory, commandName));
1987 if (process.platform === 'win32') {
1988 candidates.push(path.join(directory, `${commandName}.cmd`));
1989 candidates.push(path.join(directory, `${commandName}.ps1`));
1990 }
1991 }
1992 return candidates;
1993}
1994
1995function parseLegacyWrapperCandidate(candidatePath) {
1996 let stat = null;

Calls 4

filterMethod · 0.45
splitMethod · 0.45
pushMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected