diff options
Diffstat (limited to 'src/pacman.nim')
-rw-r--r-- | src/pacman.nim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pacman.nim b/src/pacman.nim index 05abf51..58bf42b 100644 --- a/src/pacman.nim +++ b/src/pacman.nim @@ -356,8 +356,10 @@ proc obtainPacmanConfig*(args: seq[Argument]): PacmanConfig = x <- y.split(',')), string].toSet let hasKeyserver = forkWaitRedirect(() => (block: - dropPrivileges() - execResult(gpgConfCmd, "--list-options", "gpg"))) + if dropPrivileges(): + execResult(gpgConfCmd, "--list-options", "gpg") + else: + quit(1))) .output .filter(s => s.len > 10 and s[0 .. 9] == "keyserver:" and not (s[^2] == ':')) .len > 0 |