Skip to content

Commit

Permalink
fix #13121
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Jan 12, 2020
1 parent 1143191 commit a3f3d7e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions compiler/docgen.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1054,14 +1054,13 @@ proc writeOutput*(d: PDoc, useWarning = false) =
if optStdout in d.conf.globalOptions:
writeRope(stdout, content)
else:
template outfile: untyped = d.destFile
let outfile = d.destFile
#let outfile = getOutFile2(d.conf, shortenDir(d.conf, filename), outExt, "htmldocs")
createDir(outfile.splitFile.dir)
if not writeRope(content, outfile):
rawMessage(d.conf, if useWarning: warnCannotOpenFile else: errCannotOpenFile,
outfile.string)
# for some reason, outfile is relative, violating its type contract
d.conf.outFileAlt = outfile.`$`.absolutePath.AbsoluteFile
d.conf.outFileAlt = outfile

proc writeOutputJson*(d: PDoc, useWarning = false) =
runAllExamples(d)
Expand Down

0 comments on commit a3f3d7e

Please sign in to comment.