clan-cli: secrets: truly catch broken symlinks in collect_keys_for_type
This commit is contained in:
@@ -99,7 +99,7 @@ def collect_keys_for_type(folder: Path) -> set[tuple[str, sops.KeyType]]:
|
|||||||
if not p.is_symlink():
|
if not p.is_symlink():
|
||||||
continue
|
continue
|
||||||
try:
|
try:
|
||||||
target = p.resolve()
|
target = p.resolve(strict=True)
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
log.warning(f"Ignoring broken symlink {p}")
|
log.warning(f"Ignoring broken symlink {p}")
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user