CommandLineTools: fix ability to specify <haxelib version/> in project with local .haxelib directory

If the version of Lime tools doesn't match the version of Lime specified by <haxelib version/>, and Lime is found in .haxelib, append the -nolocalrepocheck option to avoid redundantly checking for .haxelib again and potentially comparing to a path resolved without accounting for <haxelib version/> yet.
This commit is contained in:
Josh Tynjala
2025-06-05 08:48:21 -07:00
parent c1f79fbfba
commit 95e63398c8

View File

@@ -1825,6 +1825,13 @@ class CommandLineTools
args.push("-notoolscheck");
var projectDirectory = Path.directory(projectFile);
var localRepository = Path.combine(projectDirectory, ".haxelib");
if (FileSystem.exists(localRepository) && FileSystem.isDirectory(localRepository) && StringTools.startsWith(path, localRepository))
{
args.push("-nolocalrepocheck");
}
Sys.setCwd(path);
var args = [Path.combine(path, "run.n")].concat(args);
args.push(workingDirectory);