fix: logs CLI _resolve crashes on a non-string name (#1631)

This commit is contained in:
Afonso Coutinho
2026-06-03 00:59:30 +01:00
committed by GitHub
parent 0051023056
commit 6b2618dab4
2 changed files with 27 additions and 0 deletions

View File

@@ -58,6 +58,8 @@ def _resolve(name: str) -> Path | None:
"""Match a log by exact filename, basename-without-extension, or
substring. Returns the most-recently-modified match if there are
ties."""
if not isinstance(name, str):
return None
candidates = []
for base in (_APP_LOGS, _TMUX_LOGS):
if not base.is_dir():