MCPcopy
hub / github.com/di-sukharev/opencommit / step

Function step

out/cli.cjs:1166–1174  ·  view source on GitHub ↗
(i3)

Source from the content-addressed store, hash-verified

1164 const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
1165 const found = [];
1166 const step = (i3) => new Promise((resolve, reject) => {
1167 if (i3 === pathEnv.length)
1168 return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
1169 const ppRaw = pathEnv[i3];
1170 const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
1171 const pCmd = path5.join(pathPart, cmd);
1172 const p4 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
1173 resolve(subStep(p4, i3, 0));
1174 });
1175 const subStep = (p4, i3, ii) => new Promise((resolve, reject) => {
1176 if (ii === pathExt.length)
1177 return resolve(step(i3 + 1));

Callers 3

subStepFunction · 0.85
whichFunction · 0.85
resume2Function · 0.85

Calls 7

rejectFunction · 0.85
getNotFoundErrorFunction · 0.85
subStepFunction · 0.85
settle2Function · 0.85
testMethod · 0.80
thenMethod · 0.80
sliceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…