aboutsummaryrefslogtreecommitdiff
path: root/src/feature/syncinstall.nim
diff options
context:
space:
mode:
authorkitsunyan2018-03-18 21:37:57 +0000
committerkitsunyan2018-03-18 21:37:57 +0000
commitf0f1a5cd5e0f32f464c9bbef18e0f28d7119964e (patch)
tree8cf103b2a54bb646a156103acfedf050a15b845b /src/feature/syncinstall.nim
parent471650128626145a3f45c543eecb6e5be4f273dd (diff)
Use keyserver from ${gpgdir}/gpg.conf by default
Diffstat (limited to 'src/feature/syncinstall.nim')
-rw-r--r--src/feature/syncinstall.nim10
1 files changed, 8 insertions, 2 deletions
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: