Skip to content

Commit f3deae3

Browse files
committed
Log rollback failures instead of silently suppressing them
1 parent e02a8a0 commit f3deae3

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/specify_cli/__init__.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1673,8 +1673,9 @@ def integration_install(
16731673
# Attempt rollback of any files written by setup
16741674
try:
16751675
integration.teardown(project_root, manifest, force=True)
1676-
except Exception:
1677-
pass
1676+
except Exception as rollback_err:
1677+
# Suppress so the original setup error remains the primary failure
1678+
console.print(f"[yellow]Warning:[/yellow] Failed to roll back integration changes: {rollback_err}")
16781679
console.print(f"[red]Error:[/red] Failed to install integration: {e}")
16791680
raise typer.Exit(1)
16801681

@@ -1905,8 +1906,9 @@ def integration_switch(
19051906
# Attempt rollback of any files written by setup
19061907
try:
19071908
target_integration.teardown(project_root, manifest, force=True)
1908-
except Exception:
1909-
pass
1909+
except Exception as rollback_err:
1910+
# Suppress so the original setup error remains the primary failure
1911+
console.print(f"[yellow]Warning:[/yellow] Failed to roll back integration '{target}': {rollback_err}")
19101912
console.print(f"[red]Error:[/red] Failed to install integration '{target}': {e}")
19111913
raise typer.Exit(1)
19121914

0 commit comments

Comments
 (0)