affaan-m/ECC · error · Error
Multiple ECC repo roots detected
Error message
Multiple ECC repo roots detected: ${uniqueRepoRoots.join(', ')} What it means
runAutoUpdate infers the ECC repo root(s) from the environment. If no repo root was explicitly requested and inference finds more than one distinct root, it throws instead of guessing which repo to update, because updating the wrong checkout could corrupt unrelated installs.
Solutions
- Pass the repo root explicitly via the CLI flag/option so inference is skipped
- Remove or rename the duplicate ECC checkout(s) listed in the error
- Run auto-update from inside one specific ECC repo directory
- Audit for symlinked or stale install paths producing extra inferred roots
Example fix
// before node scripts/auto-update.js // Error: Multiple ECC repo roots detected: /home/me/ECC, /home/me/tools/ECC // after node scripts/auto-update.js --repo-root /home/me/ECC
Defensive patterns
Strategy: validation
Validate before calling
const roots = collectInferredRepoRoots();
if (new Set(roots).size > 1 && !process.env.ECC_REPO_ROOT) {
throw new Error(`Multiple repo roots: ${[...new Set(roots)].join(', ')}; set ECC_REPO_ROOT`);
} Try / catch
try {
await runAutoUpdate({});
} catch (err) {
if (String(err.message).startsWith('Multiple ECC repo roots')) {
return runAutoUpdate({ requestedRepoRoot: process.cwd() });
}
throw err;
} Prevention
- Keep only one ECC checkout on the machine, or pass an explicit repo root
- Set the repo-root option in scripts/CI instead of relying on inference
- Remove stale clones and broken symlinks
- Log inferred roots during setup to catch ambiguity early
When it happens
Trigger: Calling runAutoUpdate without a requestedRepoRoot option while the inference logic collects two or more unique repo roots (e.g. running the script from a directory nested between multiple ECC checkouts or multiple detected install paths).
Common situations: A developer has cloned ECC twice (dev copy and installed copy) and runs auto-update from a shared parent; CI caches place multiple repo copies on disk; symlinked installs causing multiple resolved roots.
Understand the failure class
Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.
Related errors
- Announcements discussion category is required
- Choose at least one guided harness: Claude, Codex, or Kimi.
- config must be a JSON object
- createPlanCanvasServer requires a session store
- Dependency cycle
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/ee43430f6ff3687f.
Report an issue: GitHub.
Appendix: source
Thrown at scripts/auto-update.js:247
installStatePath: record.installStatePath,
status: 'error',
error: record.error || 'No valid install-state available'
});
continue;
}
const recordRepoRoot = requestedRepoRoot || validateRepoRoot(deriveRepoRootFromState(record.state));
inferredRepoRoots.push(recordRepoRoot);
validRecords.push({
record,
repoRoot: recordRepoRoot
});
}
if (!requestedRepoRoot) {
const uniqueRepoRoots = [...new Set(inferredRepoRoots)];
if (uniqueRepoRoots.length > 1) {
throw new Error(`Multiple ECC repo roots detected: ${uniqueRepoRoots.join(', ')}`);
}
}
const repoRoot = requestedRepoRoot || inferredRepoRoots[0] || null;
if (!repoRoot) {
return {
dryRun: Boolean(options.dryRun),
repoRoot,
results,
warnings,
summary: {
checkedCount: results.length,
updatedCount: 0,
errorCount: results.length
}
};
}
View on GitHub (pinned to 8321021c54)