Skip to content

Commit df4519b

Browse files
committed
MacPlatform: report an error if the HashLink binary directory doesn't exist
Better than this: Uncaught exception - std@sys_read_dir
1 parent c3852d7 commit df4519b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tools/platforms/MacPlatform.hx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,16 @@ class MacPlatform extends PlatformTarget
653653
var limeDirectory = Haxelib.getPath(new Haxelib("lime"), true);
654654
var bindir = "Mac64";
655655
var bundledHLDirectory = Path.combine(limeDirectory, 'templates/bin/hl/$bindir');
656+
if (!FileSystem.exists(bundledHLDirectory))
657+
{
658+
Log.error('Directory does not exist: $bundledHLDirectory');
659+
return;
660+
}
661+
if (!FileSystem.isDirectory(bundledHLDirectory))
662+
{
663+
Log.error('Not a directory: $bundledHLDirectory');
664+
return;
665+
}
656666

657667
// these are the known directories where Homebrew installs its dependencies
658668
// we may need to add more in the future, but this seems to be enough for now

0 commit comments

Comments
 (0)