This commit is contained in:
@@ -78,7 +78,7 @@ wait_for_spacetime() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if spacetime --root-dir="${root_dir}" server ping "${server}" >/dev/null 2>&1; then
|
||||
if is_spacetime_ready "${server}" "${root_dir}"; then
|
||||
return
|
||||
fi
|
||||
|
||||
@@ -92,8 +92,14 @@ wait_for_spacetime() {
|
||||
is_spacetime_ready() {
|
||||
local server="$1"
|
||||
local root_dir="$2"
|
||||
local output
|
||||
|
||||
spacetime --root-dir="${root_dir}" server ping "${server}" >/dev/null 2>&1
|
||||
if ! output="$(spacetime --root-dir="${root_dir}" server ping "${server}" 2>&1)"; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# SpacetimeDB CLI 2.1.0 在 502 Bad Gateway 时仍可能返回 0,不能只依赖退出码。
|
||||
[[ "${output}" == *"Server is online:"* ]]
|
||||
}
|
||||
|
||||
describe_spacetime_root_owner() {
|
||||
|
||||
Reference in New Issue
Block a user