Skip to content

Commit 04535be

Browse files
perf: avoid duplicate read in core command inventory
Co-authored-by: nicolehaugen <10600161+nicolehaugen@users.noreply.github.com>
1 parent 0a7ea11 commit 04535be

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/specify_cli/artifacts/__init__.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,12 @@ def _enumerate_core_commands(project_root: Path | None = None) -> list[_CoreBase
284284
)
285285
if path is None:
286286
continue
287+
if logical_name in rows_by_name:
288+
continue
287289
try:
288290
text = path.read_text(encoding="utf-8")
289291
except (OSError, UnicodeDecodeError):
290292
text = ""
291-
if logical_name in rows_by_name:
292-
continue
293293
rows_by_name[logical_name] = _CoreBaselineRow(
294294
name=logical_name,
295295
kind="command",

0 commit comments

Comments
 (0)