Skip to content

Commit eabaacc

Browse files
[ci] Allow simctl shutdown to fail (#4024)
Since adding `set -e`, this script sometimes fails with: ``` An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=405): Unable to shutdown device in current state: Shutdown ``` Allow shutdown to fail; if something is really wrong that prevents cleanup, deleting the device should still fail, so this should be harmless.
1 parent 4edb651 commit eabaacc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.ci/scripts/remove_simulator.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ set -e
77
# The name here must match create_simulator.sh
88
readonly DEVICE_NAME=Flutter-iPhone
99

10-
xcrun simctl shutdown "$DEVICE_NAME"
10+
# Allow shutdown to fail; cases like "already shut down" exit with failure.
11+
xcrun simctl shutdown "$DEVICE_NAME" || :
1112
xcrun simctl delete "$DEVICE_NAME"
1213
xcrun simctl list

0 commit comments

Comments
 (0)