Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
f81490c
Initial plan
Copilot Apr 3, 2026
5391d77
Add specify integration subcommand (list, install, uninstall, switch)
Copilot Apr 3, 2026
a914d8d
Address review feedback: extract helper, fix return type annotation
Copilot Apr 3, 2026
8a36cd9
Potential fix for pull request finding 'Unused import'
mnriem Apr 3, 2026
f5e9752
Address review feedback: validate script type, handle --flag=value, f…
mnriem Apr 3, 2026
ffc1b66
Block --force with different integration, persist script type in init…
mnriem Apr 3, 2026
94a348a
Remove --force from integration install, ensure shared infra on insta…
mnriem Apr 3, 2026
42f3c5f
Remove redundant installed_key != key check
mnriem Apr 3, 2026
a831849
Run shared infra unconditionally, defer metadata removal in switch
mnriem Apr 3, 2026
e02a8a0
Add install rollback, graceful manifest errors, clear switch metadata
mnriem Apr 3, 2026
f3deae3
Log rollback failures instead of silently suppressing them
mnriem Apr 3, 2026
e7f14de
Handle corrupt manifest in switch, distinguish unknown vs missing man…
mnriem Apr 3, 2026
c949fe7
Clean up metadata on rollback, broaden init-options match in uninstall
mnriem Apr 3, 2026
3fdfa00
Fix recovery guidance for unreadable manifests, fix type annotations
mnriem Apr 3, 2026
2e5bc22
Allow manifest-only uninstall for unknown/removed integrations
mnriem Apr 3, 2026
947a8e5
Fail fast on corrupt integration.json, validate integration options
mnriem Apr 3, 2026
f6733ba
Validate integration.json is a dict, fail fast on missing manifest in…
mnriem Apr 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Handle corrupt manifest in switch, distinguish unknown vs missing man…
…ifest

- Wrap IntegrationManifest.load() in switch with ValueError/FileNotFoundError
  handling, matching the pattern used in uninstall
- Split else branch to report 'unknown integration' vs 'no manifest' separately
  • Loading branch information
mnriem committed Apr 3, 2026
commit e7f14dec0a01bc8987842acc0de497adfc5ecece
10 changes: 9 additions & 1 deletion src/specify_cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1856,14 +1856,22 @@ def integration_switch(

if current_integration and manifest_path.exists():
console.print(f"Uninstalling current integration: [cyan]{installed_key}[/cyan]")
old_manifest = IntegrationManifest.load(installed_key, project_root)
try:
old_manifest = IntegrationManifest.load(installed_key, project_root)
except (ValueError, FileNotFoundError) as exc:
console.print(f"[red]Error:[/red] Could not read integration manifest for '{installed_key}': {manifest_path}")
console.print(f"[dim]{exc}[/dim]")
console.print("Try repairing or removing the manifest file, then rerun the command.")
raise typer.Exit(1)
removed, skipped = current_integration.teardown(
project_root, old_manifest, force=force,
)
if removed:
console.print(f" Removed {len(removed)} file(s)")
if skipped:
console.print(f" [yellow]⚠[/yellow] {len(skipped)} modified file(s) preserved")
Comment thread
mnriem marked this conversation as resolved.
elif not current_integration:
console.print(f"[dim]Unknown installed integration '{installed_key}' — skipping uninstall phase[/dim]")
else:
console.print(f"[dim]No manifest for '{installed_key}' — skipping uninstall phase[/dim]")

Expand Down
Loading