Explorar el Código

do not call exitCode twice (fixed issue #850)

Simon Krajewski hace 13 años
padre
commit
9e95ae2721
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      std/tools/haxelib/Main.hx

+ 2 - 1
std/tools/haxelib/Main.hx

@@ -885,7 +885,8 @@ class Main {
 	
 	function command( cmd:String, args:Array<String> ) {
 		var p = new neko.io.Process(cmd, args);
-		return { code:p.exitCode(), out:p.exitCode() == 0 ? p.stdout.readAll().toString() : p.stderr.readAll().toString() };
+		var code = p.exitCode();
+		return { code:code, out: code == 0 ? p.stdout.readAll().toString() : p.stderr.readAll().toString() };
 	}	
 
 	// ----------------------------------