Display a nice error screen if Git is not installed

This commit is contained in:
blinry 2021-02-11 11:54:09 +01:00
parent 5b590b8367
commit 2fc78f3e99

View file

@ -22,11 +22,15 @@ func _ready():
game.toggle_music()
global_shell = Shell.new()
create_file_in_game_env(".gitconfig", helpers.read_file("res://scripts/gitconfig"))
copy_script_to_game_env("fake-editor")
copy_script_to_game_env("hint")
if global_shell.run("command -v git &>/dev/null && echo yes || echo no") == "no\n":
game.skipped_title = true
get_tree().change_scene("res://scenes/no_git.tscn")
else:
create_file_in_game_env(".gitconfig", helpers.read_file("res://scripts/gitconfig"))
copy_script_to_game_env("fake-editor")
copy_script_to_game_env("hint")
load_state()