* honor --errorMax even for tools (eg drnim, nim doc) (#14546)

* fix a bug that prevented nim doc compiler/nim on windows
This commit is contained in:
Timothee Cour 2020-06-02 09:54:33 -07:00 • committed by GitHub
commit 4301a3da9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 22 additions and 15 deletions

View file

@ -137,6 +137,7 @@ proc destroyInterpreter*(i: Interpreter) =
proc runRepl*(r: TLLRepl;
searchPaths: openArray[string];
supportNimscript: bool) =
## deadcode but please don't remove... might be revived
var conf = newConfigRef()
var cache = newIdentCache()
var graph = newModuleGraph(cache, conf)
@ -146,7 +147,7 @@ proc runRepl*(r: TLLRepl;
if conf.libpath.isEmpty: conf.libpath = AbsoluteDir p
conf.cmd = cmdInteractive
conf.errorMax = high(int)
conf.setErrorMaxHighMaybe
initDefines(conf.symbols)
defineSymbol(conf.symbols, "nimscript")
if supportNimscript: defineSymbol(conf.symbols, "nimconfig")