Skip to content

Commit b38a161

Browse files
committed
fix: show discovery-only status, clear metadata files in clear_cache
1 parent dc44ee7 commit b38a161

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/specify_cli/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1816,10 +1816,13 @@ def integration_list(
18161816
for entry in sorted(entries, key=lambda e: e["id"]):
18171817
eid = entry["id"]
18181818
cat_name = entry.get("_catalog_name", "")
1819+
install_allowed = entry.get("_install_allowed", True)
18191820
if eid == installed_key:
18201821
status = "[green]installed[/green]"
18211822
elif eid in INTEGRATION_REGISTRY:
18221823
status = "built-in"
1824+
elif install_allowed is False:
1825+
status = "discovery-only"
18231826
else:
18241827
status = ""
18251828
table.add_row(

src/specify_cli/integrations/catalog.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,8 +404,9 @@ def get_integration_info(
404404
def clear_cache(self) -> None:
405405
"""Remove all cached catalog files."""
406406
if self.cache_dir.exists():
407-
for f in self.cache_dir.glob("catalog-*.json"):
408-
f.unlink(missing_ok=True)
407+
for pattern in ("catalog-*.json", "catalog-*-metadata.json"):
408+
for f in self.cache_dir.glob(pattern):
409+
f.unlink(missing_ok=True)
409410

410411

411412
# ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)