Fail gracefully when DMG smoketest fails (#30975)

It seems that timing issues (related to MacOS or the GitHub MacOS)
runners can sometimes cause `hdiutil detach` to fail. Instead of having
this cause the entire build to fail, fail gracefully. This is
essentially a non-issue as the CI environment is always cleaned up when
using GitHub Actions.

Fixes #30757.
This commit is contained in:
Martin Robinson 2024-01-02 17:11:16 +01:00 committed by GitHub
parent bbadef3365
commit 3353db71d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -24,4 +24,7 @@ grep 'success' /tmp/out
# Clean up.
popd
hdiutil detach /Volumes/Servo
hdiutil detach /Volumes/Servo || \
echo "WARNING: Could not detach /Volumes/Servo. " \
"Please detach with hdiutil manually."