From 2f2b26d269ba690ffe90708d1cb16f415cc673cb Mon Sep 17 00:00:00 2001 From: Joey Yakimowich-Payne Date: Sun, 24 Jun 2018 07:50:47 +0900 Subject: Change project dir based on nimgen cfg file --- nimgen.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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"): -- cgit v1.2.3