diff options
author | Emery Hemingway <ehmry@posteo.net> | 2023-04-17 18:53:42 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-17 20:53:42 +0200 |
commit | 2621f78b683592dced21cd93aa241deac8a9232f (patch) | |
tree | 540a8b88388616f9a4a92ef4dcc61f6b7f419ccf /compiler/docgen.nim | |
parent | 65223e6f59ddef9f04fb15bd39bf5dae3abb2e39 (diff) | |
download | Nim-2621f78b683592dced21cd93aa241deac8a9232f.tar.gz |
compiler/docgen: pass --path:… to runnableExamples (#21669)
Diffstat (limited to 'compiler/docgen.nim')
-rw-r--r-- | compiler/docgen.nim | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/docgen.nim b/compiler/docgen.nim index f592d8845..a833bded4 100644 --- a/compiler/docgen.nim +++ b/compiler/docgen.nim @@ -565,10 +565,13 @@ proc runAllExamples(d: PDoc) = # most useful semantics is that `docCmd` comes after `rdoccmd`, so that we can (temporarily) override # via command line # D20210224T221756:here - let cmd = "$nim $backend -r --lib:$libpath --warning:UnusedImport:off --path:$path --nimcache:$nimcache $rdoccmd $docCmd $file" % [ + var pathArgs = "--path:$path" % [ "path", quoteShell(d.conf.projectPath) ] + for p in d.conf.searchPaths: + pathArgs = "$args --path:$path" % [ "args", pathArgs, "path", quoteShell(p) ] + let cmd = "$nim $backend -r --lib:$libpath --warning:UnusedImport:off $pathArgs --nimcache:$nimcache $rdoccmd $docCmd $file" % [ "nim", quoteShell(os.getAppFilename()), "backend", $d.conf.backend, - "path", quoteShell(d.conf.projectPath), + "pathArgs", pathArgs, "libpath", quoteShell(d.conf.libpath), "nimcache", quoteShell(outputDir), "file", quoteShell(outp), |