github/spec-kit · error · RuntimeError
Cannot safely update hard-linked generated artifact '{origin
Error message
Cannot safely update hard-linked generated artifact '{original_file}' What it means
Error "Cannot safely update hard-linked generated artifact '{original_file}'" thrown in github/spec-kit.
Source
Thrown at src/specify_cli/extensions/_commands.py:1671
new_skill_paths_absent_before_update = []
# Validation failures must not rewrite an untouched installation.
installation_modified = False
zip_cleanup_error = None
backup_created_by_attempt = False
def backup_command_artifact(original_file, backup_file):
"""Back up one command artifact once, preserving its full path."""
nonlocal backup_created_by_attempt
original_key = str(original_file)
if original_key in backed_up_command_files:
return
if original_file.is_symlink():
backed_up_command_symlinks[original_key] = os.readlink(
original_file
)
else:
if original_file.stat().st_nlink > 1:
raise RuntimeError(
"Cannot safely update hard-linked generated "
f"artifact '{original_file}'"
)
backup_created_by_attempt = True
backup_file.parent.mkdir(parents=True, exist_ok=True)
shutil.copy2(original_file, backup_file)
backed_up_command_files[original_key] = str(backup_file)
def restore_command_artifact(original_path, backup_path):
"""Restore one regular file or symlink without following it."""
original_key = str(original_path)
original_file = Path(original_path)
backup_file = Path(backup_path)
symlink_state = backed_up_command_symlinks.get(
original_key
)
if symlink_state is not None:View on GitHub (pinned to bf88c9f9a8)
Solutions
- Replace the hard-linked generated artifact with a regular file, then retry the update.
When it happens
Trigger: Thrown at src/specify_cli/extensions/_commands.py:1671 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/5cad3376defa3ff6.
Report an issue: GitHub.