Skip to content

Commit

Permalink
[MacOS] Add closing System Preference window for arm64 (actions#8470)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-pyshnoi authored Oct 12, 2023
1 parent d77bb13 commit eff24a9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions images/macos/provision/core/open_windows_check.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/bin/bash -e -o pipefail

source ~/utils/utils.sh

# Close System Preferences window because in Ventura arm64 it is opened by default on Apperance tab
if is_VenturaArm64; then
echo "Close System Preferences window"
osascript -e 'tell application "System Preferences" to quit'
fi

retry=10
while [ $retry -gt 0 ]; do
openwindows=$(osascript -e 'tell application "System Events" to get every window of (every process whose class of windows contains window)') && break
Expand Down
1 change: 1 addition & 0 deletions images/macos/templates/macOS-13.arm64.anka.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ build {
provisioner "shell" {
pause_before = "30s"
scripts = [
"./provision/core/open_windows_check.sh",
"./provision/core/powershell.sh",
"./provision/core/mono.sh",
"./provision/core/dotnet.sh",
Expand Down

0 comments on commit eff24a9

Please sign in to comment.