aboutsummaryrefslogtreecommitdiff
path: root/src/utils.nim
diff options
context:
space:
mode:
authorkitsunyan2018-03-16 18:22:16 +0000
committerkitsunyan2018-03-16 18:22:16 +0000
commit8d0508a73cd984fa532ff9f29cbedba5d0e0aa81 (patch)
tree4b085ac238974a0a62693d5c6a598604fd1f2970 /src/utils.nim
parenta57808b1a143f5bf0f04e2dbc4969742e4b73a2a (diff)
Use unsetenv instead of setenv with empty string
Diffstat (limited to 'src/utils.nim')
-rw-r--r--src/utils.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils.nim b/src/utils.nim
index 288cf44..c1146ae 100644
--- a/src/utils.nim
+++ b/src/utils.nim
@@ -158,6 +158,9 @@ proc runProgram*(args: varargs[string]): seq[string] =
proc setenv*(name: cstring, value: cstring, override: cint): cint
{.importc, header: "<stdlib.h>".}
+proc unsetenv*(name: cstring): cint
+ {.importc, header: "<stdlib.h>".}
+
proc getUser*: (int, string) =
let uid = getuid()
while true: