diff --git a/nimgen.nim b/nimgen.nim index ee91e97..14e6692 100644 --- a/nimgen.nim +++ b/nimgen.nim @@ -5,7 +5,7 @@ var gDoneAfter: seq[string] = @[] gDoneInline: seq[string] = @[] - gProjectDir = getCurrentDir() + gProjectDir = "" gConfig: Config gFilter = "" gQuotes = true @@ -726,6 +726,8 @@ proc runCfg(cfg: string) = if not fileExists(cfg): raise newException(Exception, "Config doesn't exist: " & cfg) + gProjectDir = parentDir(cfg) + gConfig = loadConfig(cfg) if gConfig.hasKey("n.global"):