docgen tests: patch 'nim' commands to use the currently running exe instead
This commit is contained in:
parent
d2fb6cc222
commit
23c323ea1d
1 changed files with 6 additions and 4 deletions
|
|
@ -976,10 +976,12 @@ proc commandRstAux(cache: IdentCache, conf: ConfigRef;
|
||||||
# Nim's convention: every path is relative to the file it was written in:
|
# Nim's convention: every path is relative to the file it was written in:
|
||||||
outp = splitFile(d.filename).dir.AbsoluteDir / RelativeFile(filename)
|
outp = splitFile(d.filename).dir.AbsoluteDir / RelativeFile(filename)
|
||||||
writeFile(outp, content)
|
writeFile(outp, content)
|
||||||
let cmd = cmd % quoteShell(outp)
|
let c = if cmd.startsWith("nim "): os.getAppFilename() & cmd.substr(3)
|
||||||
rawMessage(conf, hintExecuting, cmd)
|
else: cmd
|
||||||
if execShellCmd(cmd) != status:
|
let c2 = c % quoteShell(outp)
|
||||||
rawMessage(conf, errGenerated, "executing of external program failed: " & cmd)
|
rawMessage(conf, hintExecuting, c2)
|
||||||
|
if execShellCmd(c2) != status:
|
||||||
|
rawMessage(conf, errGenerated, "executing of external program failed: " & c2)
|
||||||
|
|
||||||
d.isPureRst = true
|
d.isPureRst = true
|
||||||
var rst = parseRst(readFile(filen.string), filen.string, 0, 1, d.hasToc,
|
var rst = parseRst(readFile(filen.string), filen.string, 0, 1, d.hasToc,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue