aboutsummaryrefslogtreecommitdiff
path: root/src/pacman.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman.nim')
-rw-r--r--src/pacman.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pacman.nim b/src/pacman.nim
index 5315df1..ecec5dc 100644
--- a/src/pacman.nim
+++ b/src/pacman.nim
@@ -352,7 +352,10 @@ proc obtainPacmanConfig*(args: seq[Argument]): PacmanConfig =
let ignorePkgs = getAll((none(string), "ignore")).toSet
let ignoreGroups = getAll((none(string), "ignoregroups")).toSet
- let hasKeyserver = runProgram(gpgConfCmd, "--list-options", "gpg")
+ let hasKeyserver = forkWaitRedirect(() => (block:
+ dropPrivileges()
+ execResult(gpgConfCmd, "--list-options", "gpg")))
+ .output
.filter(s => s.len > 10 and s[0 .. 9] == "keyserver:" and not (s[^2] == ':'))
.len > 0