fix(mac): ensure retry for mac disk detach actually repeats

Increment needed a guard in order to not abort the script. I have tested
locally (stubbing out hdiutil and replacing with false!) -- so I am more
confident this time.

Test-bot: skip
Build-bot: skip
Follows: #15176
This commit is contained in:
Marc Durdin 2025-12-09 16:06:04 +01:00
parent 026096fde4
commit 5451c70743

View file

@ -200,7 +200,7 @@ while (( DETACH_SUCCESS < 10 )); do
echo "hdiutil detach reported failure code ${DETACH_RESULT}"
fi
if [[ $DETACH_RESULT != 0 ]] || [[ -d "$STAGING_DIR" ]] ; then
(( DETACH_SUCCESS++ ))
(( DETACH_SUCCESS++ )) || true
echo "Failed to unmount: \"$STAGING_DIR\" on attempt #$DETACH_SUCCESS. Waiting 5 seconds to try again."
if (( DETACH_SUCCESS == 6 )); then
echo " Note: Detach failed first five times, so now attempting with '-force'"