From 910d81043ea7408eb9773a40a4267b9c9e30ada4 Mon Sep 17 00:00:00 2001 From: Quratulain-bilal Date: Fri, 31 Jul 2026 20:52:25 +0500 Subject: [PATCH] fix: log rollback errors instead of silently swallowing them _rollback() caught and discarded all exceptions during component removal. If a rollback step fails, the user has no indication the rollback was incomplete. Add debug logging so failures are visible. --- src/specify_cli/bundler/services/installer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/specify_cli/bundler/services/installer.py b/src/specify_cli/bundler/services/installer.py index 58e220638d..38bf6e71c9 100644 --- a/src/specify_cli/bundler/services/installer.py +++ b/src/specify_cli/bundler/services/installer.py @@ -11,6 +11,7 @@ """ from __future__ import annotations +import logging from dataclasses import dataclass, field from pathlib import Path from typing import Protocol @@ -250,8 +251,10 @@ def _rollback( installer: PrimitiveInstaller, done: list[ComponentRef], ) -> None: + logger = logging.getLogger(__name__) for component in reversed(done): try: installer.remove(project_root, component) except Exception: # noqa: BLE001 - best-effort rollback + logger.debug("rollback failed for %s: %s", component, exc_info=True) continue