Skip to content

Commit cde475b

Browse files
Update anka clean script (#8537)
1 parent eff24a9 commit cde475b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

images.CI/macos/anka/CreateCleanAnkaTemplate.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function Invoke-SoftwareUpdate {
9090

9191
Write-Host "`t[*] Fetching Software Updates ready to install on '$TemplateName' VM:"
9292
Show-StringWithFormat $newUpdates
93-
$listOfNewUpdates = $($($newUpdates.Split("*")).Split("Title") | Where-Object {$_ -match "Label:"}).Replace("Label: ", '')
93+
$listOfNewUpdates = $($($newUpdates.Split("*")).Split("Title") | Where-Object {$_ -match "Label:"}).Replace("Label: ", '') | Where-Object {$_ -notmatch "macOS Sonoma"}
9494
Write-Host "`t[*] Installing Software Updates on '$TemplateName' VM:"
9595
Install-SoftwareUpdate -HostName $ipAddress -listOfUpdates $listOfNewUpdates -Password $Password | Show-StringWithFormat
9696

@@ -99,7 +99,7 @@ function Invoke-SoftwareUpdate {
9999
$listOfNewUpdates = $newUpdates.split('*').Trim('')
100100
foreach ($newupdate in $listOfNewUpdates) {
101101
# Will be True if the value is not Venture, not empty, and contains "Action: restart" words
102-
if ($newupdate.Contains("Action: restart") -and !$newupdate.Contains("macOS Ventura") -and (-not [String]::IsNullOrEmpty($newupdate))) {
102+
if ($newupdate.Contains("Action: restart") -and (!$newupdate.Contains("macOS Ventura") -or !$newupdate.Contains("macOS Sonoma")) -and (-not [String]::IsNullOrEmpty($newupdate))) {
103103
Write-Host "`t[*] Sleep 60 seconds before the software updates have been installed"
104104
Start-Sleep -Seconds 60
105105

0 commit comments

Comments
 (0)