fixed logic to not compare the VERSION number when VERSION is set to … (#3389)

This commit is contained in:
JairG
2025-04-02 18:38:04 -06:00
committed by GitHub
parent dedf8bc587
commit 9f1a18ef34

View File

@@ -25,11 +25,17 @@ use_proxy() {
}
use_server_list_ping() {
if [[ "${VERSION^^}" == "LATEST" || "${VERSION^^}" == "SNAPSHOT" ]]; then
# Don't use server-list ping for unknown version
return 1
fi
if versionLessThan 1.7; then
echo "--use-server-list-ping"
fi
}
mc_server_listening() {
mc-monitor status $(use_proxy) --host "${SERVER_HOST:-localhost}" --port "$SERVER_PORT" $(use_server_list_ping) --timeout 10s >&/dev/null
}