fixes #11953; jsondoc creates no files unless the htmldocs dir is created (#20198)

* fixes #11953; jsondoc creates no files unless the htmldocs dir is created

* target

* fixes runner
This commit is contained in:
ringabout
2022-08-21 08:09:48 +08:00
committed by GitHub
parent 1b61e71bb8
commit d8d86e07c3
2 changed files with 18 additions and 0 deletions

View File

@@ -1617,6 +1617,8 @@ proc writeOutputJson*(d: PDoc, useWarning = false) =
if optStdout in d.conf.globalOptions:
write(stdout, $content)
else:
let dir = d.destFile.splitFile.dir
createDir(dir)
var f: File
if open(f, d.destFile, fmWrite):
write(f, $content)