diff --git a/check.sh b/check.sh index fb9c859cc..c745a99a6 100755 --- a/check.sh +++ b/check.sh @@ -67,6 +67,16 @@ function findGodot() { echo "Found 'godot4' executable" godotBin="godot4" + elif command -v godot &>/dev/null; then + # Check if `godot` actually is Godot 4.x + if godot --version | grep -qE "^4\\."; then + echo "Found 'godot' executable with version $(godot --version)" + godotBin="godot" + else + echo "Godot executable found, but it is the incompatible version $(godot --version)" + exit 2 + fi + # Special case for Windows when there is a .bat file # Also consider that 'cmd /c' would need 'cmd //c' (https://stackoverflow.com/q/21357813) elif @@ -99,7 +109,7 @@ for arg in "${args[@]}"; do ;; itest) findGodot - + cmds+=("cargo $toolchain build -p itest $extraArgs") cmds+=("$godotBin --path itest/godot --headless") ;;