Skip to content

Commit

Permalink
compiler/docgen: pass --path:… to runnableExamples
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmry committed Apr 2, 2023
1 parent 718373c commit d61dc77
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions compiler/docgen.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit d61dc77

Please sign in to comment.