summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorEuklidAlexandria <36775154+EuklidAlexandria@users.noreply.github.com>2024-07-17 16:48:59 +0200
committerGitHub <noreply@github.com>2024-07-17 22:48:59 +0800
commit2b7c47b1222b4276ea12452e84f3b8d44b6b8315 (patch)
tree7abb73aa424534496a4eb9b91056ce961f42357c
parent9de74b7097559ddb121d012f5f415b39856780b7 (diff)
downloadNim-2b7c47b1222b4276ea12452e84f3b8d44b6b8315.tar.gz
Fixes #23846; prepend nimArgs to args (#23847)
Fixes #23846. Probably, nimArgs should be prepended in other places
(e.g. `buildDocSamples`).
-rw-r--r--tools/kochdocs.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/kochdocs.nim b/tools/kochdocs.nim
index bd5c4ecbe..477fb29fa 100644
--- a/tools/kochdocs.nim
+++ b/tools/kochdocs.nim
@@ -325,7 +325,8 @@ proc nim2pdf(src: string, dst: string, nimArgs: string) =
       exec(cmd)
   moveFile(texFile.changeFileExt("pdf"), dst)
 
-proc buildPdfDoc*(nimArgs, destPath: string) =
+proc buildPdfDoc*(args: string, destPath: string) =
+  let args = nimArgs & " " & args
   var pdfList: seq[string]
   createDir(destPath)
   if os.execShellCmd("xelatex -version") != 0:
@@ -334,7 +335,7 @@ proc buildPdfDoc*(nimArgs, destPath: string) =
     for src in items(mdPdfList):
       let dst = destPath / src.lastPathPart.changeFileExt("pdf")
       pdfList.add dst
-      nim2pdf(src, dst, nimArgs)
+      nim2pdf(src, dst, args)
   echo "\nOutput PDF files: \n  ", pdfList.join(" ") # because `nim2pdf` is a bit verbose
 
 proc buildJS(): string =