Moved environment variable retrieval code to env file.
h3rald h3rald@h3rald.com
Sun, 09 Dec 2018 17:24:50 +0100
4 files changed,
14 insertions(+),
14 deletions(-)
M
core/consts.nim
→
core/consts.nim
@@ -1,20 +1,6 @@
-import - os - const pkgName* = "min" pkgVersion* = "0.19.3" pkgAuthor* = "Fabio Cevasco" pkgDescription* = "A tiny concatenative programming language and shell." - -var HOME*: string -if defined(windows): - HOME = getenv("USERPROFILE") -if not defined(windows): - HOME = getenv("HOME") - -let MINRC* = HOME / ".minrc" -let MINSYMBOLS* = HOME / ".min_symbols" -let MINHISTORY* = HOME / ".min_history" -let MINLIBS* = HOME / ".minlibs"
A
core/env.nim
@@ -0,0 +1,12 @@
+import os + +var HOME*: string +if defined(windows): + HOME = getenv("USERPROFILE") +if not defined(windows): + HOME = getenv("HOME") + +let MINRC* = HOME / ".minrc" +let MINSYMBOLS* = HOME / ".min_symbols" +let MINHISTORY* = HOME / ".min_history" +let MINLIBS* = HOME / ".minlibs"
M
lib/min_lang.nim
→
lib/min_lang.nim
@@ -8,6 +8,7 @@ json,
os, logging import + ../core/env, ../core/consts, ../core/parser, ../core/value,