Skip to content

Commit

Permalink
fix: exit code on error
Browse files Browse the repository at this point in the history
  • Loading branch information
derkork committed Jun 1, 2024
1 parent 6610aad commit dfb3746
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions addons/gut/gui/GutRunner.gd
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,12 @@ func _exit_tree():
func _on_tests_finished(should_exit, should_exit_on_success):
_write_results()

var failed = _gut.get_fail_count() > 0
var exit_code = 1 if failed else 0
if(should_exit):
get_tree().quit()
get_tree().quit(exit_code)
elif(should_exit_on_success and _gut.get_fail_count() == 0):
get_tree().quit()
get_tree().quit(exit_code)


func get_gut():
Expand Down

0 comments on commit dfb3746

Please sign in to comment.