mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-30 03:03:57 +00:00
Fixes #4871
This commit is contained in:
@@ -1242,7 +1242,8 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
|
||||
|
||||
createStr regs[ra]
|
||||
regs[ra].node.strVal = opGorge(regs[rb].node.strVal,
|
||||
regs[rc].node.strVal, regs[rd].node.strVal)
|
||||
regs[rc].node.strVal, regs[rd].node.strVal,
|
||||
c.debug[pc])
|
||||
of opcNError:
|
||||
stackTrace(c, tos, pc, errUser, regs[ra].node.strVal)
|
||||
of opcNWarning:
|
||||
|
||||
@@ -19,7 +19,8 @@ proc readOutput(p: Process): string =
|
||||
result.setLen(result.len - "\n".len)
|
||||
discard p.waitForExit
|
||||
|
||||
proc opGorge*(cmd, input, cache: string): string =
|
||||
proc opGorge*(cmd, input, cache: string, info: TLineInfo): string =
|
||||
let workingDir = parentDir(info.toFullPath)
|
||||
if cache.len > 0:# and optForceFullMake notin gGlobalOptions:
|
||||
let h = secureHash(cmd & "\t" & input & "\t" & cache)
|
||||
let filename = options.toGeneratedFile("gorge_" & $h, "txt")
|
||||
@@ -30,7 +31,8 @@ proc opGorge*(cmd, input, cache: string): string =
|
||||
return
|
||||
var readSuccessful = false
|
||||
try:
|
||||
var p = startProcess(cmd, options={poEvalCommand, poStderrToStdout})
|
||||
var p = startProcess(cmd, workingDir,
|
||||
options={poEvalCommand, poStderrToStdout})
|
||||
if input.len != 0:
|
||||
p.inputStream.write(input)
|
||||
p.inputStream.close()
|
||||
@@ -41,7 +43,8 @@ proc opGorge*(cmd, input, cache: string): string =
|
||||
if not readSuccessful: result = ""
|
||||
else:
|
||||
try:
|
||||
var p = startProcess(cmd, options={poEvalCommand, poStderrToStdout})
|
||||
var p = startProcess(cmd, workingDir,
|
||||
options={poEvalCommand, poStderrToStdout})
|
||||
if input.len != 0:
|
||||
p.inputStream.write(input)
|
||||
p.inputStream.close()
|
||||
|
||||
Reference in New Issue
Block a user