Skip to content

Commit 8896727

Browse files
committed
check.sh script: take into account both exit codes 0 and 255 from 'godot --version'
1 parent 48d8fd7 commit 8896727

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

check.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ function findGodot() {
4646
# Special case for Windows when there is a .bat file
4747
# Also consider that 'cmd /c' would need 'cmd //c' (https://stackoverflow.com/q/21357813)
4848
elif
49-
# Don't ask me why Godot returns 255 instead of 0
49+
# Godot returns 255 for older versions, but 0 for newer ones
5050
godot.bat --version
51-
[ $? -eq 255 ]
51+
[[ $? -eq 255 || $? -eq 0 ]]
5252
then
5353
echo "Found 'godot.bat' script"
5454
godotBin="godot.bat"

0 commit comments

Comments
 (0)