summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-01-04 13:39:47 +0100
committerAraq <rumpf_a@web.de>2019-01-04 13:39:54 +0100
commit5101b6befd55a7e32694a09a23dc818cb63dcbb6 (patch)
tree8b3bb3813f399299112581dc6cac5466d6b3c4e2 /compiler
parent69149a0e925d641c35e677a72b356e7f546e7e99 (diff)
downloadNim-5101b6befd55a7e32694a09a23dc818cb63dcbb6.tar.gz
fixes #10188
Diffstat (limited to 'compiler')
-rw-r--r--compiler/docgen.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/docgen.nim b/compiler/docgen.nim
index 0fe19c5bc..1af9c06b8 100644
--- a/compiler/docgen.nim
+++ b/compiler/docgen.nim
@@ -382,6 +382,7 @@ proc testExample(d: PDoc; ex: PNode) =
   d.examples.add "import r\"" & outp.string & "\"\n"
 
 proc runAllExamples(d: PDoc) =
+  if d.examples.len == 0: return
   let outputDir = d.conf.getNimcacheDir / RelativeDir"runnableExamples"
   let outp = outputDir / RelativeFile(extractFilename(d.filename.changeFileExt"" &
       "_examples.nim"))