Warn user about unrecognized or misspelled builtin_* options.
Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
This commit is contained in:
parent
4631a617e5
commit
54dd926b00
1 changed files with 9 additions and 0 deletions
|
@ -322,6 +322,15 @@ opts.Add("rcflags", "Custom flags for Windows resource compiler")
|
||||||
# in following code (especially platform and custom_modules).
|
# in following code (especially platform and custom_modules).
|
||||||
opts.Update(env)
|
opts.Update(env)
|
||||||
|
|
||||||
|
# Warn user about unrecognized or misspelled builtin_* options.
|
||||||
|
# Currently it works only for command line variables
|
||||||
|
# TODO: Add the same check for options defined inside profile
|
||||||
|
# file. Look at alternative profile loading approach in:
|
||||||
|
# <https://github.com/godotengine/godot/pull/91794>
|
||||||
|
for key, _ in opts.UnknownVariables().items():
|
||||||
|
if key.startswith("builtin_"):
|
||||||
|
print_warning("Unrecognized {} option. Check option name for misspelling".format(key))
|
||||||
|
|
||||||
# Copy custom environment variables if set.
|
# Copy custom environment variables if set.
|
||||||
if env["import_env_vars"]:
|
if env["import_env_vars"]:
|
||||||
for env_var in str(env["import_env_vars"]).split(","):
|
for env_var in str(env["import_env_vars"]).split(","):
|
||||||
|
|
Loading…
Reference in a new issue