Merge pull request #45901 from akien-mga/scons-fix-custom_modules-is_engine
SCons: Fix Godot detection in custom modules logic
This commit is contained in:
@ -174,9 +174,7 @@ def detect_modules(search_path, recursive=False):
|
|||||||
version_path = os.path.join(path, "version.py")
|
version_path = os.path.join(path, "version.py")
|
||||||
if os.path.exists(version_path):
|
if os.path.exists(version_path):
|
||||||
with open(version_path) as f:
|
with open(version_path) as f:
|
||||||
version = {}
|
if 'short_name = "godot"' in f.read():
|
||||||
exec(f.read(), version)
|
|
||||||
if version.get("short_name") == "godot":
|
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user