protect against new stupid setlen that doesn't accept -1 anymore
This commit is contained in:
parent
eef0e1bde1
commit
2a1620490c
1 changed files with 2 additions and 1 deletions
|
|
@ -15,7 +15,8 @@ proc readOutput(p: Process): string =
|
|||
while not output.atEnd:
|
||||
result.add(output.readLine)
|
||||
result.add("\n")
|
||||
result.setLen(result.len - "\n".len)
|
||||
if result.len > 0:
|
||||
result.setLen(result.len - "\n".len)
|
||||
discard p.waitForExit
|
||||
|
||||
proc opGorge*(cmd, input: string): string =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue