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

Function resolveProjectDir

src/adapters/scripts/_runtimePaths.js:237–247  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

235// fall through to cwd instead. We intentionally do NOT recurse into evolver
236// package discovery here — this is purely "where is the user's code".
237function resolveProjectDir() {
238 for (const key of ['CURSOR_PROJECT_DIR', 'CLAUDE_PROJECT_DIR']) {
239 const v = process.env[key];
240 if (typeof v === 'string' && v.trim()) {
241 try {
242 if (fs.statSync(v).isDirectory()) return v;
243 } catch { /* not a usable dir — try next / fall back to cwd */ }
244 }
245 }
246 return process.cwd();
247}
248
249// Determine the workspace ROOT for a project, mirroring src/gep/paths.js
250// getWorkspaceRoot() step-for-step so the FS-only fallback lands its secret at

Callers 6

resolveWorkspaceIdFunction · 0.85
getGitDiffStatsFunction · 0.85
recordToLocalFunction · 0.85
finishWithInputFunction · 0.85
runInjectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected