{"record":{"id":"5afa16b70892b888","repo":"github/spec-kit","slug":"refusing-to-use-symlinked-context-label","errorCode":null,"errorMessage":"Refusing to use symlinked {context}: {label}","messagePattern":"Refusing to use symlinked (.+?): (.+?)","errorType":"exception","errorClass":"SymlinkedSharedPathError","httpStatus":null,"severity":"error","filePath":"src/specify_cli/shared_infra.py","lineNumber":195,"sourceCode":"\n\ndef _ensure_safe_shared_directory(\n    project_path: Path,\n    directory: Path,\n    *,\n    create: bool = True,\n    context: str = \"shared infrastructure directory\",\n) -> None:\n    \"\"\"Create a shared infra directory without following symlinked parents.\"\"\"\n    root = project_path.resolve()\n    rel = _shared_relative_path(project_path, directory)\n    current = project_path\n\n    for part in rel.parts:\n        current = current / part\n        label = _shared_destination_label(project_path, current)\n        if current.is_symlink():\n            raise SymlinkedSharedPathError(f\"Refusing to use symlinked {context}: {label}\")\n        if current.exists():\n            if not current.is_dir():\n                raise ValueError(f\"{context.capitalize()} path is not a directory: {label}\")\n            try:\n                current.resolve().relative_to(root)\n            except (OSError, ValueError):\n                raise ValueError(f\"{context.capitalize()} escapes project root: {label}\") from None\n            continue\n        if not create:\n            raise ValueError(f\"{context.capitalize()} does not exist: {label}\")\n        current.mkdir()\n        if current.is_symlink():\n            raise SymlinkedSharedPathError(f\"Refusing to use symlinked {context}: {label}\")\n        try:\n            current.resolve().relative_to(root)\n        except (OSError, ValueError):\n            raise ValueError(f\"{context.capitalize()} escapes project root: {label}\") from None\n","sourceCodeStart":177,"sourceCodeEnd":213,"githubUrl":"https://github.com/github/spec-kit/blob/bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c/src/specify_cli/shared_infra.py#L177-L213","documentation":"Error \"Refusing to use symlinked {context}: {label}\" thrown in github/spec-kit.","triggerScenarios":"Thrown at src/specify_cli/shared_infra.py:195 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Replace the symlinked path with a real directory, then retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c","analyzedAt":"2026-08-14T19:43:37.150Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}