nimscript.patchFile supports $lib and stuff

This commit is contained in:
Araq 2016-07-14 01:40:12 +02:00
commit 6dddb3e68e

View file

@ -126,7 +126,7 @@ proc setupVM*(module: PSym; scriptName: string): PEvalContext =
let key = a.getString(0) & "_" & a.getString(1) let key = a.getString(0) & "_" & a.getString(1)
var val = a.getString(2).addFileExt(NimExt) var val = a.getString(2).addFileExt(NimExt)
if not isAbsolute(val): if not isAbsolute(val):
val = vthisDir / val val = vthisDir / pathSubs(val, vthisDir)
gModuleOverrides[key] = val gModuleOverrides[key] = val
proc runNimScript*(scriptName: string; freshDefines=true) = proc runNimScript*(scriptName: string; freshDefines=true) =