mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 11:36:05 +01:00
gpg: fix correctly setting trust for all keys
When passing `gpg.publicKeys` a `source` including _multiple_ keys, only the first one in `source` will have `trust` set correctly. This commit fixes the issue and adds a corresponding test (failing without the patch, fixed with it).
This commit is contained in:
parent
a5fee07792
commit
95d65dddae
4 changed files with 108 additions and 1 deletions
|
|
@ -125,7 +125,7 @@ let
|
|||
|
||||
function importTrust() {
|
||||
local keyIds trust
|
||||
IFS='\n' read -ra keyIds <<< "$(gpgKeyId "$1")"
|
||||
mapfile -t keyIds <<< "$(gpgKeyId "$1")"
|
||||
trust="$2"
|
||||
for id in "''${keyIds[@]}" ; do
|
||||
{ echo trust; echo "$trust"; (( trust == 5 )) && echo y; echo quit; } \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue