From 9fa070b1dc566c23b9f8c1684d33b63e9ed3b3c4 Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Wed, 4 Mar 2020 01:26:56 -0800 Subject: [PATCH] fix hintSuccess: `out` was wrong for `nim doc` without `-o` flag (#13569) --- compiler/docgen.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/docgen.nim b/compiler/docgen.nim index 6c98266b5..064bdc93e 100644 --- a/compiler/docgen.nim +++ b/compiler/docgen.nim @@ -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)