From 1c13de1d1732cca808c8d7e2f4e5adfe72fecefc Mon Sep 17 00:00:00 2001 From: Gregory Marco Date: Fri, 16 Oct 2026 19:14:42 -0500 Subject: [PATCH] Prefer the "godot" on PATH by default, and fall back to the steam version if that's unavailable. --- goat/godot.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/goat/godot.py b/goat/godot.py index c991e7a..a5870c6 100644 --- a/goat/godot.py +++ b/goat/godot.py @@ -1,9 +1,13 @@ import os import subprocess +import shutil from . import util -GODOT_PATHS = ["C:\Program Files (x86)\Steam\steamapps\common\Godot Engine\godot.windows.opt.tools.64.exe"] +GODOT_PATHS = [ + shutil.which("godot"), + "C:\Program Files (x86)\Steam\steamapps\common\Godot Engine\godot.windows.opt.tools.64.exe" +] GODOT_PROJECT = "project.godot" class Project(): @@ -18,7 +22,7 @@ class Project(): def find_command(): for exe in GODOT_PATHS: - if os.path.exists(exe): + if exe and os.path.exists(exe): return exe return "godot"