fix: correct indentation and add forge-gui candidate path

This commit is contained in:
KoalaTrapLord authored and GitHub committed 2026-03-19 18:24:57 -04:00
1 parent 56ea2602b4
commit e5377ef4bc
1 file changed
+2 -7
+2 -7
View File
@@ -159,13 +159,7 @@ def _resolve_forge_dir() -> str:
return str(candidate)
# Also try just one level up from target/
candidate = jar_path.parent.parent
# Check sibling dirs of forge-gui-desktop for res/ (e.g. forge-gui/res)
repo_root = jar_path.parent.parent.parent
if repo_root.is_dir():
for sibling in sorted(repo_root.iterdir()):
if sibling.is_dir() and (sibling / "res").is_dir():
return str(sibling)
if candidate.is_dir() and (candidate / "res").is_dir():
andidate / "res").is_dir():
return str(candidate)
# Fall back to the directory containing the JAR itself
candidate = jar_path.parent
@@ -177,6 +171,7 @@ def _resolve_forge_dir() -> str:
for candidate in [
project_root / "forge",
project_root.parent / "forge-repo",
project_root.parent / "forge-repo" / "forge-gui",
project_root.parent / "forge",
project_root / "forge-gui-desktop",
]: