MCPcopy Create free account
hub / github.com/EvoMap/evolver / commandUsesCurrentRepoRelativeIndex

Function commandUsesCurrentRepoRelativeIndex

src/ops/lifecycle.js:491–497  ·  view source on GitHub ↗
(cmd, cwd)

Source from the content-addressed store, hash-verified

489}
490
491function commandUsesCurrentRepoRelativeIndex(cmd, cwd) {
492 if (!cwd) return false;
493 var script = getNodeScriptToken(splitCommandLine(cmd));
494 if (!script || path.isAbsolute(script)) return false;
495 if (path.basename(script.replace(/\\/g, '/')).toLowerCase() !== 'index.js') return false;
496 return sameRealPath(path.resolve(cwd, script), path.join(getRepoRoot(), 'index.js'));
497}
498
499function isCurrentLoopCommand(cmd, cwd) {
500 var raw = String(cmd || '');

Callers 1

isCurrentLoopCommandFunction · 0.85

Calls 4

getNodeScriptTokenFunction · 0.85
splitCommandLineFunction · 0.85
sameRealPathFunction · 0.85
getRepoRootFunction · 0.85

Tested by

no test coverage detected