From f0f1a5cd5e0f32f464c9bbef18e0f28d7119964e Mon Sep 17 00:00:00 2001 From: kitsunyan Date: Mon, 19 Mar 2018 00:37:57 +0300 Subject: Use keyserver from ${gpgdir}/gpg.conf by default --- src/feature/syncinstall.nim | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/feature/syncinstall.nim') diff --git a/src/feature/syncinstall.nim b/src/feature/syncinstall.nim index e0dd2a2..87b445c 100644 --- a/src/feature/syncinstall.nim +++ b/src/feature/syncinstall.nim @@ -595,8 +595,14 @@ proc handleInstall(args: seq[Argument], config: Config, upgradeCount: int, ('a', tr"abort operation")) keysLoop(index, newSkipKeys) elif res == 'y' or newSkipKeys: - let importCode = forkWait(() => execResult(gpgCmd, - "--recv-keys", pgpKeys[index])) + let importCode = if config.pgpKeyserver.isSome: + forkWait(() => execResult(gpgCmd, + "--keyserver", config.pgpKeyserver.unsafeGet, + "--recv-keys", pgpKeys[index])) + else: + forkWait(() => execResult(gpgCmd, + "--recv-keys", pgpKeys[index])) + if importCode == 0 or newSkipKeys or noconfirm: keysLoop(index + 1, newSkipKeys) else: -- cgit v1.2.3-70-g09d2