@@ -70,16 +70,16 @@ proc execCleanPath*(cmd: string,
70
70
71
71
proc nimexec * (cmd: string ) =
72
72
# Consider using `nimCompile` instead
73
- exec findNim () & " " & cmd
73
+ exec findNim (). quoteShell () & " " & cmd
74
74
75
75
proc nimCompile * (input: string , outputDir = " bin" , mode = " c" , options = " " ) =
76
76
let output = outputDir / input.splitFile.name.exe
77
- let cmd = findNim () & " " & mode & " -o:" & output & " " & options & " " & input
77
+ let cmd = findNim (). quoteShell () & " " & mode & " -o:" & output & " " & options & " " & input
78
78
exec cmd
79
79
80
80
proc nimCompileFold * (desc, input: string , outputDir = " bin" , mode = " c" , options = " " ) =
81
81
let output = outputDir / input.splitFile.name.exe
82
- let cmd = findNim () & " " & mode & " -o:" & output & " " & options & " " & input
82
+ let cmd = findNim (). quoteShell () & " " & mode & " -o:" & output & " " & options & " " & input
83
83
execFold (desc, cmd)
84
84
85
85
const
@@ -299,15 +299,15 @@ proc buildDocSamples(nimArgs, destPath: string) =
299
299
# #
300
300
# # TODO: consider integrating into the existing generic documentation builders
301
301
# # now that we have a single `doc` command.
302
- exec (findNim () & " doc $# -o:$# $#" %
302
+ exec (findNim (). quoteShell () & " doc $# -o:$# $#" %
303
303
[nimArgs, destPath / " docgen_sample.html" , " doc" / " docgen_sample.nim" ])
304
304
305
305
proc buildDoc (nimArgs, destPath: string ) =
306
306
# call nim for the documentation:
307
307
var
308
308
commands = newSeq [string ](rst2html.len + len (doc0) + len (doc) + withoutIndex.len)
309
309
i = 0
310
- let nim = findNim ()
310
+ let nim = findNim (). quoteShell ()
311
311
for d in items (rst2html):
312
312
commands[i] = nim & " rst2html $# --git.url:$# -o:$# --index:on $#" %
313
313
[nimArgs, gitUrl,
@@ -339,7 +339,7 @@ proc buildPdfDoc*(nimArgs, destPath: string) =
339
339
else :
340
340
const pdflatexcmd = " pdflatex -interaction=nonstopmode "
341
341
for d in items (pdf):
342
- exec (findNim () & " rst2tex $# $#" % [nimArgs, d])
342
+ exec (findNim (). quoteShell () & " rst2tex $# $#" % [nimArgs, d])
343
343
# call LaTeX twice to get cross references right:
344
344
exec (pdflatexcmd & changeFileExt (d, " tex" ))
345
345
exec (pdflatexcmd & changeFileExt (d, " tex" ))
@@ -356,9 +356,9 @@ proc buildPdfDoc*(nimArgs, destPath: string) =
356
356
removeFile (changeFileExt (d, " tex" ))
357
357
358
358
proc buildJS () =
359
- exec (findNim () & " js -d:release --out:$1 tools/nimblepkglist.nim" %
359
+ exec (findNim (). quoteShell () & " js -d:release --out:$1 tools/nimblepkglist.nim" %
360
360
[webUploadOutput / " nimblepkglist.js" ])
361
- exec (findNim () & " js " & (docHackDir / " dochack.nim" ))
361
+ exec (findNim (). quoteShell () & " js " & (docHackDir / " dochack.nim" ))
362
362
363
363
proc buildDocs * (args: string ) =
364
364
const
0 commit comments