Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Godot 4: Gut gives "Unrecognized options" when running on the command line #416

Closed
aaronfranke opened this issue Sep 5, 2022 · 4 comments
Labels
Godot 4.0 Issues related to Godot 4.0

Comments

@aaronfranke
Copy link
Contributor

aaronfranke commented Sep 5, 2022

I tried to get started with unit testing based on this wiki page and using the Godot 4 branch.

When I am cd'd into the folder with my Godot project, and I run this command:

godot --debug --script addons/gut/gut_cmdln.gd

I get this output:

 ---  Gut  ---
Unrecognized options:  ["--script", "addons/gut/gut_cmdln.gd"]

I tried running echo $? and it gives 1, so Gut is indicating an unclean exit.

If I remove those options it says are unrecognized, then Gut doesn't run, it just starts my app normally.

@bitwes
Copy link
Owner

bitwes commented Sep 6, 2022

I believe you want -d and -s for debug and script. If you can get the following to print out the help, then you got it working.
godot -d -s --path $PWD addons/gut/gut_cmdln.gd -gh

When working with the godot_4 branch, be sure to read the GODOT_4_README.md. I try to keep that up to date with the development. It's still in a very fragile state.

@aaronfranke
Copy link
Contributor Author

aaronfranke commented Sep 6, 2022

@bitwes This is weird, -d is an alias for --debug and -s is an alias for --script, but when I use -d -s it works, while with --debug --script it does not work. Is this a bug in Gut? I would prefer to use the full words --debug --script in automated scripts for increased readability.

EDIT: --debug -s works, but -d --script does not work, so it's a problem with the script argument.

EDIT 2: Fixed #419

@bitwes
Copy link
Owner

bitwes commented Sep 8, 2022

#419 fixed this. Thanks for the PR.

@bitwes bitwes closed this as completed Sep 8, 2022
@bitwes bitwes added the Godot 4.0 Issues related to Godot 4.0 label Sep 8, 2022
@Frontrider
Copy link

Same issue on 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Godot 4.0 Issues related to Godot 4.0
Projects
None yet
Development

No branches or pull requests

3 participants