clan-cli: secrets: truly catch broken symlinks in collect_keys_for_type

This commit is contained in:
Louis Opter
2025-01-22 18:16:35 +00:00
committed by Mic92
parent e2c6b7bffc
commit 5fc9440a1e

View File

@@ -99,7 +99,7 @@ def collect_keys_for_type(folder: Path) -> set[tuple[str, sops.KeyType]]:
if not p.is_symlink():
continue
try:
target = p.resolve()
target = p.resolve(strict=True)
except FileNotFoundError:
log.warning(f"Ignoring broken symlink {p}")
continue