{"record":{"id":"826d8308a166ced4","repo":"github/spec-kit","slug":"cannot-safely-reuse-an-existing-update-backup-dire","errorCode":null,"errorMessage":"Cannot safely reuse an existing update backup directory '{backup_base}'","messagePattern":"Cannot safely reuse an existing update backup directory '(.+?)'","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/specify_cli/extensions/_commands.py","lineNumber":1755,"sourceCode":"                    original_key = str(skill_dir)\n                    if original_key in backed_up_skill_dirs:\n                        continue\n                    backup_created_by_attempt = True\n                    backup_skills_dir.mkdir(parents=True, exist_ok=True)\n                    backup_skill_dir = backup_skills_dir / str(\n                        len(backed_up_skill_dirs)\n                    )\n                    shutil.copytree(skill_dir, backup_skill_dir, symlinks=True)\n                    backed_up_skill_dirs[original_key] = str(backup_skill_dir)\n\n            try:\n                if backup_root.is_symlink():\n                    raise RuntimeError(\n                        \"Cannot safely create update backup under symlinked \"\n                        f\"directory '{backup_root}'\"\n                    )\n                if backup_base.exists() or backup_base.is_symlink():\n                    raise RuntimeError(\n                        \"Cannot safely reuse an existing update backup \"\n                        f\"directory '{backup_base}'\"\n                    )\n\n                # 1. Backup registry entry (always, even if extension dir doesn't exist)\n                backup_registry_entry = manager.registry.get(extension_id)\n\n                # 2. Backup extension directory\n                extension_dir = manager.extensions_dir / extension_id\n                if extension_dir.exists():\n                    backup_created_by_attempt = True\n                    backup_base.mkdir(parents=True, exist_ok=True)\n                    if backup_ext_dir.exists():\n                        shutil.rmtree(backup_ext_dir)\n                    shutil.copytree(extension_dir, backup_ext_dir)\n\n                    # Backup config files separately so they can be restored\n                    # after a successful install (install_from_directory clears dest dir).","sourceCodeStart":1737,"sourceCodeEnd":1773,"githubUrl":"https://github.com/github/spec-kit/blob/bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c/src/specify_cli/extensions/_commands.py#L1737-L1773","documentation":"Error \"Cannot safely reuse an existing update backup directory '{backup_base}'\" thrown in github/spec-kit.","triggerScenarios":"Thrown at src/specify_cli/extensions/_commands.py:1755 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the existing update backup directory and retry the update."],"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-15T22:17:37.221Z"}