File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,18 @@ function findGodot() {
76
76
echo " Found 'godot4.bat' script"
77
77
godotBin=" godot4.bat"
78
78
79
+ # This should come last: only use this as a last resort as usually `godot`
80
+ # refers to a Godot 3.x installation.
81
+ elif command -v godot & > /dev/null; then
82
+ # Check if `godot` actually is Godot 4.x
83
+ if godot --version | grep -qE " ^4\\ ." ; then
84
+ echo " Found 'godot' executable with version $( godot --version) "
85
+ godotBin=" godot"
86
+ else
87
+ echo " Found 'godot' executable, but it has the incompatible version $( godot --version) "
88
+ exit 2
89
+ fi
90
+
79
91
# Error case
80
92
else
81
93
echo " Godot executable not found"
@@ -99,7 +111,7 @@ for arg in "${args[@]}"; do
99
111
;;
100
112
itest)
101
113
findGodot
102
-
114
+
103
115
cmds+=(" cargo $toolchain build -p itest $extraArgs " )
104
116
cmds+=(" $godotBin --path itest/godot --headless" )
105
117
;;
You can’t perform that action at this time.
0 commit comments