mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-14 15:23:27 +00:00
compiler/docgen: pass --path:… to runnableExamples (#21669)
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user