Skip to content

Commit c21426e

Browse files
committed
[FIX] Failsafe env["TOOLS"] variable getter
1 parent 19b54c1 commit c21426e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

SCsub

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Import('env')
55
Import('env_modules')
66
env_module = env_modules.Clone()
77
JS_ENGINE = 'quickjs'
8+
TOOLS = env.get('TOOLS');
89

910
def open_file(path, mode):
1011
if platform.python_version() > '3':
@@ -41,7 +42,7 @@ if JS_ENGINE == 'quickjs':
4142
env_module.Append(CPPPATH=["quickjs/quickjs"])
4243
# env_module.Append(CXXFLAGS=["-std=c++20"])
4344
# env_module.Append(CCFLAGS=["-std=c++20"])
44-
if env['tools']:
45+
if TOOLS:
4546
env_module.add_source_files(env.modules_sources, 'tools/editor_tools.cpp')
4647
env_module.add_source_files(env.modules_sources, 'quickjs/quickjs_builtin_binder.gen.cpp')
4748
env_module.add_source_files(env.modules_sources, 'quickjs/*.cpp')
@@ -60,7 +61,7 @@ sources = [
6061
'misc/godot.binding_script.gen.cpp',
6162
]
6263

63-
if env['tools']:
64+
if TOOLS:
6465
base_text = '/* THIS FILE IS GENERATED DO NOT EDIT */\n#include "editor_tools.h"\nString JavaScriptPlugin::{} = \n{};'
6566
tool_fns = {"tools/godot.d.ts.gen.cpp": ("BUILTIN_DECLARATION_TEXT", dump_text_file_to_cpp("misc/godot.d.ts")),
6667
"tools/tsconfig.json.gen.cpp": ("TSCONFIG_CONTENT", dump_text_file_to_cpp("misc/tsconfig.json")),

0 commit comments

Comments
 (0)