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

MainLoop can no longer provide an exit code when it quits. #90646

Closed
jamie-pate opened this issue Apr 13, 2024 · 2 comments
Closed

MainLoop can no longer provide an exit code when it quits. #90646

jamie-pate opened this issue Apr 13, 2024 · 2 comments

Comments

@jamie-pate
Copy link
Contributor

jamie-pate commented Apr 13, 2024

Tested versions

  • Reproducible in 4.3-dev5
  • Reproducible in 4.2.1-stable

System information

Godot v4.2.1.stable - Ubuntu 22.04.4 LTS 22.04 - X11 - Vulkan (Forward+) - integrated Intel(R) Graphics (ADL GT2) () - 12th Gen Intel(R) Core(TM) i7-12700H (14 Threads)

Issue description

60d2c1f removed OS.set_exit_code() but it had a valid use case for setting the exit code from MainLoop.

I suggest adding MainLoop.set_exit_code() since MainLoop has no .quit() where you can provide the exit code.

Steps to reproduce

godot -s main_loop.gd

extends MainLoop
func _process(delta):
    # No longer have any way to accomplish this
    # OS.set_exit_code(1)
    # workaround?
    var st := SceneTree.new()
    st.quit(1)
    st.free()
    return true

Minimal reproduction project (MRP)

main_loop_exit_code.zip

jamie-pate added a commit to jamie-pate/godot-code-coverage that referenced this issue Apr 13, 2024
Adds gdlint and formatting.

Work around some missing pieces of godot4

godotengine/godot#90646
godotengine/godot#90643
@Calinou
Copy link
Member

Calinou commented Nov 18, 2024

Closing in favor of godotengine/godot-proposals#7557, as feature proposals are tracked on the Godot proposals repository.

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

No branches or pull requests

4 participants