aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nimgen.nim4
1 files changed, 3 insertions, 1 deletions
diff --git a/nimgen.nim b/nimgen.nim
index e601153..14ece01 100644
--- a/nimgen.nim
+++ b/nimgen.nim
@@ -4,7 +4,7 @@ var
gDoneRecursive: seq[string] = @[]
gDoneInline: seq[string] = @[]
- gProjectDir = getCurrentDir()
+ gProjectDir = ""
gConfig: Config
gFilter = ""
gQuotes = true
@@ -651,6 +651,8 @@ proc runCfg(cfg: string) =
echo "Config doesn't exist: " & cfg
quit(1)
+ gProjectDir = parentDir(cfg)
+
gConfig = loadConfig(cfg)
if gConfig.hasKey("n.global"):