aboutsummaryrefslogtreecommitdiff
path: root/src/config.nim
diff options
context:
space:
mode:
authorkitsunyan2018-04-08 20:54:18 +0000
committerkitsunyan2018-04-08 20:54:18 +0000
commit72b8161f2f37a0a6b091e300810a40e9a775c64b (patch)
tree2c127c810f6574da500dc3400b4a46f377640c26 /src/config.nim
parent52ab10b957d557f269363d5441a6fa34a2542b21 (diff)
Allow running via sudo
Diffstat (limited to 'src/config.nim')
-rw-r--r--src/config.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/config.nim b/src/config.nim
index 25ab011..8b0e0f5 100644
--- a/src/config.nim
+++ b/src/config.nim
@@ -111,10 +111,10 @@ proc obtainConfig*(config: PacmanConfig): Config =
let db = config.db
let color = config.colorMode.get
- let (userId, userName) = getUser()
+ let user = initialUser.get(currentUser)
let tmpRoot = options.opt("TmpDir").get("/tmp/pakku-${USER}")
- .replace("${UID}", $userId)
- .replace("${USER}", userName)
+ .replace("${UID}", $user.uid)
+ .replace("${USER}", user.name)
let aurComments = options.hasKey("AurComments")
let checkIgnored = options.hasKey("CheckIgnored")
let printAurNotFound = options.hasKey("PrintAurNotFound")