fix hintSuccess: out was wrong for nim doc without -o flag (#13569)

This commit is contained in:
Timothee Cour 2020-03-04 01:26:56 -08:00 • committed by GitHub
commit 9fa070b1dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1135,8 +1135,8 @@ proc generateIndex*(d: PDoc) =
proc updateOutfile(d: PDoc, outfile: AbsoluteFile) =
if d.module == nil or sfMainModule in d.module.flags: # nil for eg for commandRst2Html
if d.conf.outFile.isEmpty and not d.conf.outDir.isEmpty:
d.conf.outFile = outfile.relativeTo(d.conf.outDir)
if d.conf.outDir.isEmpty: d.conf.outDir = d.conf.projectPath
if d.conf.outFile.isEmpty: d.conf.outFile = outfile.relativeTo(d.conf.outDir)
proc writeOutput*(d: PDoc, useWarning = false) =
runAllExamples(d)