From 56ea2602b4f5a1dc3822fc38af90192a7bb164ea Mon Sep 17 00:00:00 2001 From: KoalaTrapLord <265133236+KoalaTrapLord@users.noreply.github.com> Date: Thu, 19 Mar 2026 18:19:32 -0400 Subject: [PATCH] fix: scan sibling dirs for res/ in _resolve_forge_dir (finds forge-gui/res) --- lab_api.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lab_api.py b/lab_api.py index e558101..396f5be 100644 --- a/lab_api.py +++ b/lab_api.py @@ -159,6 +159,12 @@ 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(): return str(candidate) # Fall back to the directory containing the JAR itself