[Swift-commit] r3138 - trunk/libexec

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Sun Oct 11 14:15:47 CDT 2009


Author: hategan
Date: 2009-10-11 14:15:47 -0500 (Sun, 11 Oct 2009)
New Revision: 3138

Modified:
   trunk/libexec/_swiftwrap.vbs
Log:
fixed broken loop and stream redirection

Modified: trunk/libexec/_swiftwrap.vbs
===================================================================
--- trunk/libexec/_swiftwrap.vbs	2009-10-11 01:58:08 UTC (rev 3137)
+++ trunk/libexec/_swiftwrap.vbs	2009-10-11 19:15:47 UTC (rev 3138)
@@ -281,24 +281,24 @@
 	Set p = shell.exec(prepareOne(EXEC) + " " + qargs)
 	log "Executable started"
 
-	Do While Not p.StdOut.AtEndOfStream and Not p.StdErr.AtEndOfStream and p.Status = 0
+	Do Until p.StdOut.AtEndOfStream and p.StdErr.AtEndOfStream and p.Status <> 0
 		some = False
 		If Not min Is Nothing Then
 			l = min.ReadLine
-			p.StdIn.WriteLine(l)
+			p.StdIn.Write(l)
 			some = True
 		End If
 		If Not p.StdOut.AtEndOfStream Then
 			l = p.StdOut.ReadLine
 			If Not mout Is Nothing Then
-				mout.WriteLine(l)
+				mout.Write(l)
 			End If
 			some = True
 		End If
 		If Not p.StdErr.AtEndOfStream Then
 			l = p.StdErr.ReadLine
 			If Not merr Is Nothing Then
-				merr.WriteLine(l)
+				merr.Write(l)
 			End If
 			some = True
 		End If
@@ -314,7 +314,7 @@
 		merr.close()
 	End If
 	If p.ExitCode <> 0 Then
-		fail "Exit code " + p.ExitCode, p.ExitCode
+		fail "Exit code " + CStr(p.ExitCode), p.ExitCode
 	End If
 Else
 	fail "Kickstart is not supported on Windows", 250




More information about the Swift-commit mailing list