diff options
author | alaviss <alaviss@users.noreply.github.com> | 2019-02-28 20:46:35 +0700 |
---|---|---|
committer | Miran <narimiran@disroot.org> | 2019-02-28 14:46:35 +0100 |
commit | 1b542e732077f763f12c51b4f31992060ff24fba (patch) | |
tree | 83b8d5e6317d3274e5e04cfcb62fe39e485810ae /compiler/main.nim | |
parent | 588610b395e5cfc5ae12fbb05fbec57d7e00caa1 (diff) | |
download | Nim-1b542e732077f763f12c51b4f31992060ff24fba.tar.gz |
compiler/[main,docgen]: don't put generated doc in subfolder (#10754)
* compiler/[main,docgen]: don't put generated doc in subfolder Fixes regression caused by ca4b971bc81b2e751e0388d80896fde7079b1679. foo.nim will now generates foo.html instead of foo/foo.html * compiler/[main,docgen]: map -o to -outdir for project This reinstantiate the old behavior of -o for project-wide docgen
Diffstat (limited to 'compiler/main.nim')
-rw-r--r-- | compiler/main.nim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/main.nim b/compiler/main.nim index 282f7d814..154252bf3 100644 --- a/compiler/main.nim +++ b/compiler/main.nim @@ -63,7 +63,9 @@ proc commandCheck(graph: ModuleGraph) = when not defined(leanCompiler): proc commandDoc2(graph: ModuleGraph; json: bool) = - graph.config.outDir = AbsoluteDir(graph.config.outDir / graph.config.outFile) + if optWholeProject in graph.config.globalOptions: + # Backward compatibility with previous versions + graph.config.outDir = AbsoluteDir(graph.config.outDir / graph.config.outFile) graph.config.errorMax = high(int) # do not stop after first error semanticPasses(graph) if json: registerPass(graph, docgen2JsonPass) |