Fission-AI/OpenSpec · error · Error
Cannot fork schema with linked or unsupported entry: ${sourc
Error message
Cannot fork schema with linked or unsupported entry: ${sourcePath}: ${detail} What it means
Error "Cannot fork schema with linked or unsupported entry: ${sourcePath}: ${detail}" thrown in Fission-AI/OpenSpec.
Source
Thrown at src/commands/schema.ts:256
/**
* Validate schema name format (kebab-case).
*/
function isValidSchemaName(name: string): boolean {
return /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/.test(name);
}
/**
* Copy a directory recursively.
*/
function resolveSchemaCopyPath(allowedRoot: string, sourcePath: string): string {
try {
const canonicalRoot = fs.realpathSync(allowedRoot);
const canonicalPath = fs.realpathSync(sourcePath);
FileSystemUtils.assertPathWithin(canonicalRoot, canonicalPath);
return canonicalPath;
} catch (error) {
const detail = error instanceof Error ? error.message : String(error);
throw new Error(
`Cannot fork schema with linked or unsupported entry: ${sourcePath}: ${detail}`,
{ cause: error }
);
}
}
function copyDirRecursive(
src: string,
dest: string,
allowedRoot = src,
ancestors = new Set<string>()
): void {
const canonicalSrc = resolveSchemaCopyPath(allowedRoot, src);
if (ancestors.has(canonicalSrc)) {
throw new Error(`Cannot fork schema with a linked directory cycle: ${src}`);
}
ancestors.add(canonicalSrc);
fs.mkdirSync(dest, { recursive: true });View on GitHub (pinned to 6926ccb18a)
When it happens
Trigger: Thrown at src/commands/schema.ts:256 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Fission-AI/OpenSpec@6926ccb18a (2026-08-25).
Data as JSON: /api/errors/1281484b68c86c21.
Report an issue: GitHub.