disallow recursive module dependencies

This commit is contained in:
Araq 2016-11-23 23:23:31 +01:00
commit 074f276c8a
14 changed files with 47 additions and 45 deletions

View file

@ -46,7 +46,7 @@ proc handleCmdLine(cache: IdentCache) =
if gProjectName == "-":
gProjectName = "stdinfile"
gProjectFull = "stdinfile"
gProjectPath = getCurrentDir()
gProjectPath = canonicalizePath getCurrentDir()
gProjectIsStdin = true
elif gProjectName != "":
try:
@ -54,10 +54,10 @@ proc handleCmdLine(cache: IdentCache) =
except OSError:
gProjectFull = gProjectName
let p = splitFile(gProjectFull)
gProjectPath = p.dir
gProjectPath = canonicalizePath p.dir
gProjectName = p.name
else:
gProjectPath = getCurrentDir()
gProjectPath = canonicalizePath getCurrentDir()
loadConfigs(DefaultConfig) # load all config files
let scriptFile = gProjectFull.changeFileExt("nims")
if fileExists(scriptFile):