From d61dc77f2e6718a2d0a62e0a37f4ffd8acef3d76 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Sat, 1 Apr 2023 20:02:18 -0500 Subject: [PATCH] =?UTF-8?q?compiler/docgen:=20pass=20--path:=E2=80=A6=20to?= =?UTF-8?q?=20runnableExamples?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compiler/docgen.nim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/compiler/docgen.nim b/compiler/docgen.nim index 906f0200906d..1e78852a1e68 100644 --- a/compiler/docgen.nim +++ b/compiler/docgen.nim @@ -508,10 +508,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),