Correctly check for errors in Haxelib.runProcess().
In safe mode, this function includes its own `try ... catch` block, so we don't need one here. Instead, we need to check if the output is null.
This commit is contained in:
@@ -1074,17 +1074,10 @@ class HXProject extends Script
|
|||||||
{
|
{
|
||||||
var cache = Log.verbose;
|
var cache = Log.verbose;
|
||||||
Log.verbose = Haxelib.debug;
|
Log.verbose = Haxelib.debug;
|
||||||
var output = "";
|
var output = Haxelib.runProcess("", ["path", name], true, true, true);
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
output = Haxelib.runProcess("", ["path", name], true, true, true);
|
|
||||||
}
|
|
||||||
catch (e:Dynamic) {}
|
|
||||||
|
|
||||||
Log.verbose = cache;
|
Log.verbose = cache;
|
||||||
|
|
||||||
var split = output.split("\n");
|
var split = output != null ? output.split("\n") : [];
|
||||||
var haxelibName = null;
|
var haxelibName = null;
|
||||||
|
|
||||||
for (arg in split)
|
for (arg in split)
|
||||||
|
|||||||
Reference in New Issue
Block a user