Skip to content

Commit

Permalink
Correctly check for errors in Haxelib.runProcess().
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
player-03 authored Jan 21, 2024
1 parent 13865cb commit f0aae1f
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/lime/tools/HXProject.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1074,17 +1074,10 @@ class HXProject extends Script
{
var cache = Log.verbose;
Log.verbose = Haxelib.debug;
var output = "";

try
{
output = Haxelib.runProcess("", ["path", name], true, true, true);
}
catch (e:Dynamic) {}

var output = Haxelib.runProcess("", ["path", name], true, true, true);
Log.verbose = cache;

var split = output.split("\n");
var split = output != null ? output.split("\n") : [];
var haxelibName = null;

for (arg in split)
Expand Down

1 comment on commit f0aae1f

@moxie-coder
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like it did actually work, since I got no more vague errors
IMG_3993

Please sign in to comment.