fix: multiple user keys in secrets

We were not loading all the user keys, only the first one.
This commit is contained in:
Brian McGee
2025-04-18 17:05:47 +01:00
committed by Michael Hoang
parent 1694a977f1
commit d3e1c0b4e4
4 changed files with 106 additions and 56 deletions

View File

@@ -360,7 +360,7 @@ def maybe_get_user(flake_dir: Path, key: SopsKey) -> set[SopsKey] | None:
keys = read_keys(user)
if key in keys:
return {SopsKey(key.pubkey, user.name, key.key_type)}
return {SopsKey(key.pubkey, user.name, key.key_type) for key in keys}
return None