Change project dir based on nimgen cfg file
This commit is contained in:
parent
941a530885
commit
14d8eca24b
1 changed files with 3 additions and 1 deletions
|
|
@ -5,7 +5,7 @@ var
|
||||||
gDoneAfter: seq[string] = @[]
|
gDoneAfter: seq[string] = @[]
|
||||||
gDoneInline: seq[string] = @[]
|
gDoneInline: seq[string] = @[]
|
||||||
|
|
||||||
gProjectDir = getCurrentDir()
|
gProjectDir = ""
|
||||||
gConfig: Config
|
gConfig: Config
|
||||||
gFilter = ""
|
gFilter = ""
|
||||||
gQuotes = true
|
gQuotes = true
|
||||||
|
|
@ -726,6 +726,8 @@ proc runCfg(cfg: string) =
|
||||||
if not fileExists(cfg):
|
if not fileExists(cfg):
|
||||||
raise newException(Exception, "Config doesn't exist: " & cfg)
|
raise newException(Exception, "Config doesn't exist: " & cfg)
|
||||||
|
|
||||||
|
gProjectDir = parentDir(cfg)
|
||||||
|
|
||||||
gConfig = loadConfig(cfg)
|
gConfig = loadConfig(cfg)
|
||||||
|
|
||||||
if gConfig.hasKey("n.global"):
|
if gConfig.hasKey("n.global"):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue