Skip to content

Commit a803eba

Browse files
committed
cov
1 parent 7d37510 commit a803eba

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/vectorcode/subcommands/update.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,19 @@ async def update(configs: Config) -> int:
3030
file=sys.stderr,
3131
)
3232
return 1
33-
if collection is None or not verify_ef(collection, configs):
33+
if collection is None: # pragma: nocover
34+
logger.error(
35+
f"Failed to find a collection at {configs.project_root} from {configs.db_url}"
36+
)
37+
return 1
38+
if not verify_ef(collection, configs): # pragma: nocover
3439
return 1
3540

3641
metas = (await collection.get(include=[IncludeEnum.metadatas]))["metadatas"]
37-
if metas is None:
42+
if metas is None or len(metas) == 0: # pragma: nocover
43+
logger.debug("Empty collection.")
3844
return 0
45+
3946
files_gen = (str(meta.get("path", "")) for meta in metas)
4047
files = set()
4148
orphanes = set()

0 commit comments

Comments
 (0)