github/spec-kit · error · RuntimeError
Cannot safely create update backup under symlinked directory
Error message
Cannot safely create update backup under symlinked directory '{backup_root}' What it means
Error "Cannot safely create update backup under symlinked directory '{backup_root}'" thrown in github/spec-kit.
Source
Thrown at src/specify_cli/extensions/_commands.py:1750
skill_names,
extension_id,
skills_dir=skills_dir,
create_skills_dir=False,
):
original_key = str(skill_dir)
if original_key in backed_up_skill_dirs:
continue
backup_created_by_attempt = True
backup_skills_dir.mkdir(parents=True, exist_ok=True)
backup_skill_dir = backup_skills_dir / str(
len(backed_up_skill_dirs)
)
shutil.copytree(skill_dir, backup_skill_dir, symlinks=True)
backed_up_skill_dirs[original_key] = str(backup_skill_dir)
try:
if backup_root.is_symlink():
raise RuntimeError(
"Cannot safely create update backup under symlinked "
f"directory '{backup_root}'"
)
if backup_base.exists() or backup_base.is_symlink():
raise RuntimeError(
"Cannot safely reuse an existing update backup "
f"directory '{backup_base}'"
)
# 1. Backup registry entry (always, even if extension dir doesn't exist)
backup_registry_entry = manager.registry.get(extension_id)
# 2. Backup extension directory
extension_dir = manager.extensions_dir / extension_id
if extension_dir.exists():
backup_created_by_attempt = True
backup_base.mkdir(parents=True, exist_ok=True)
if backup_ext_dir.exists():View on GitHub (pinned to bf88c9f9a8)
Solutions
- Replace the symlinked backup directory with a real directory, then retry the update.
When it happens
Trigger: Thrown at src/specify_cli/extensions/_commands.py:1750 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of github/spec-kit@bf88c9f9a8 (2026-08-14).
Data as JSON: /api/errors/cd518586231bfa5d.
Report an issue: GitHub.