-
Notifications
You must be signed in to change notification settings - Fork 123
Closed
Labels
Description
Versions
- Godot: 4.3.stable
- GUT: 9.3.0
- OS: Linux
The Bug
The new option parser in GUT 9.3.0 only understands the -s
short form argument to godot
, not the --script
long form.
Steps To Reproduce
In a project with GUT installed, run:
godot --script addons/gut/gut_cmdln.gd
The expected result is that the tests run. The actual result is that the following is printed to the terminal:
Godot Engine v4.3.stable.flathub.77dcf97d8 - https://godotengine.org
Inconsistent value (1) for DRI_PRIME. Should be < 1 (GPU devices count). Using: 0
OpenGL API 4.6 (Core Profile) Mesa 24.2.5 (git-3b9fcb7e4d) - Compatibility - Using Device: Intel - Mesa Intel(R) UHD Graphics 620 (WHL GT2)
Unknown arguments: ["--script", "addons/gut/gut_cmdln.gd"]
Changing the command line to the following works around the problem:
godot -s addons/gut/gut_cmdln.gd
In older versions, the function get_unused_options()
had the following logic:
var script_option = to_return.find("-s")
if script_option == -1:
script_option = to_return.find("--script")
if script_option != -1:
to_return.remove_at(script_option + 1)
to_return.remove_at(script_option)
In 9.3.0, the Options
class has:
var script_option = Option.new('-s', '?', 'script option provided by Godot')
# ...
func get_by_name(option_name):
var found_param = null
if(option_name == script_option.option_name):
found_param = script_option
# ...
which does not handle the --script
name.