* 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

@ -525,8 +525,7 @@ proc mainCommand(graph: ModuleGraph) =
add(conf.searchPaths, conf.libpath)
# do not stop after the first error:
conf.errorMax = high(int)
conf.setErrorMaxHighMaybe # honor --errorMax even if it may not make sense here
# do not print errors, but log them
conf.writelnHook = myLog
conf.structuredErrorHook = nil
@ -674,8 +673,7 @@ else:
add(conf.searchPaths, conf.libpath)
# do not stop after the first error:
conf.errorMax = high(int)
conf.setErrorMaxHighMaybe
# do not print errors, but log them
conf.writelnHook = myLog
conf.structuredErrorHook = nil