summary refs log tree commit diff stats
path: root/lib/pure/osproc.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-11-08 01:57:23 +0100
committerAraq <rumpf_a@web.de>2011-11-08 01:57:23 +0100
commit8c03d96c6aaa9607d3cba4e1dab401b6e0a85890 (patch)
treeeeab7c8da676036b2503048cec1de6cb633d538b /lib/pure/osproc.nim
parent25e813b5d0be2b8ea377913d145b2a2ac891c4cb (diff)
downloadNim-8c03d96c6aaa9607d3cba4e1dab401b6e0a85890.tar.gz
bugfixes for the testsuite
Diffstat (limited to 'lib/pure/osproc.nim')
-rwxr-xr-xlib/pure/osproc.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim
index 074700800..c9b536c0a 100755
--- a/lib/pure/osproc.nim
+++ b/lib/pure/osproc.nim
@@ -642,7 +642,7 @@ proc execCmdEx*(command: string, options: set[TProcessOption] = {
   var outp = outputStream(p)
   result = (TaintedString"", -1)
   while true:
-    result[1] = peekExitCode(p)
+    if result[1] == -1: result[1] = peekExitCode(p)
     if result[1] != -1 and outp.atEnd(outp): break
     result[0].string.add(outp.readLine().string)
     result[0].string.add("\n")