Fix #7157. Don't fail if the bin dir isn't where we expect it (maybe it's packaged differently)

Honestly someone with motivation and coffee needs to take a long hard
look at our packaging and see if we can do a better job.
This commit is contained in:
Dion Moult
2025-10-06 14:14:49 +11:00
parent a11f81f2ce
commit 2173a562be
+2
View File
@@ -477,6 +477,8 @@ class Blender(bonsai.core.tool.Blender):
def ensure_bin_in_path(cls) -> None:
"""Check 'bin' folder is in PATH, if not add for this session"""
bin_dir = str(Path(__file__).parent.parent.resolve() / "libs" / "bin")
if not os.path.isdir(bin_dir):
return # Maybe the user is using a system-wide Python package. See #7157.
current_path = os.environ["PATH"]
if bin_dir not in current_path:
os.environ["PATH"] = current_path + os.pathsep + bin_dir