We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 36568f8 commit 2bc36e0Copy full SHA for 2bc36e0
.github/workflows/ci-test-e2e.yml
@@ -229,7 +229,7 @@ jobs:
229
230
for attempt in $(seq 1 "$retries"); do
231
local is_primary
232
- is_primary=$(docker compose $COMPOSE_FILES exec -T mongo mongosh --quiet --eval "try { const hello = db.hello(); print((hello.isWritablePrimary || hello.ismaster) ? '1' : '0'); } catch (e) { print('0'); }" 2>/dev/null | tail -n1)
+ is_primary=$(docker compose $COMPOSE_FILES exec -T mongo mongosh --quiet --eval "try { const hello = db.hello(); print((hello.isWritablePrimary || hello.ismaster) ? '1' : '0'); } catch (e) { print('0'); }" 2>/dev/null | tail -n1 || true)
233
234
if [[ "$is_primary" == '1' ]]; then
235
echo "Mongo replica set primary is ready"
0 commit comments