Browse Source

do not call exitCode twice (fixed issue #850)

Simon Krajewski 13 years ago
parent
commit
9e95ae2721
1 changed files with 2 additions and 1 deletions
  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() };
 	}	
 
 	// ----------------------------------