fix: correct indentation in _resolve_forge_dir forge-gui sibling check

This commit is contained in:
KoalaTrapLord authored and GitHub committed 2026-03-20 11:33:42 -04:00
1 parent a2fbc30b2b
commit 2088da6fd8
1 file changed
+4 -4
+4 -4
View File
@@ -159,10 +159,10 @@ def _resolve_forge_dir() -> str:
return str(candidate)
# Also try just one level up from target/
candidate = jar_path.parent.parent
# Check forge-gui sibling of forge-gui-desktop (res/ lives there)
forge_gui_sibling = jar_path.parent.parent.parent / "forge-gui"
if forge_gui_sibling.is_dir() and (forge_gui_sibling / "res").is_dir():
return str(forge_gui_sibling)
# Check forge-gui sibling of forge-gui-desktop (res/ lives there)
forge_gui_sibling = jar_path.parent.parent.parent / "forge-gui"
if forge_gui_sibling.is_dir() and (forge_gui_sibling / "res").is_dir():
return str(forge_gui_sibling)
if candidate.is_dir() and (candidate / "res").is_dir():
return str(candidate)
# Fall back to the directory containing the JAR itself