Skip to content

Commit 78e7860

Browse files
committed
fix(cleanup): exclude in-use entries when clearing system TEMP
Disk cleanup wiped all of the system TEMP folder with no exclusions while AME Wizard runs the install from it; the user-TEMP call already excludes 'AME'. Apply the same exclusion to system TEMP so in-flight install state survives.
1 parent 45b1292 commit 78e7860

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

playbook/Executables/AtlasModules/Scripts/Internal/Invoke-DiskCleanup.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ $systemTemp = Get-FirstExistingDirectory -Paths @(
119119
)
120120
if ($systemTemp) {
121121
Write-Output 'Cleaning system TEMP folder...'
122-
Clear-DirectoryChildren -Path $systemTemp
122+
# AME Wizard runs mid-install while this phase executes; its deletable state
123+
# must survive the sweep, so exclude 'AME' exactly as the user-TEMP call does.
124+
Clear-DirectoryChildren -Path $systemTemp -ExcludeName @('AME')
123125
}
124126
else {
125127
Write-Error 'System temp folder not found!'

0 commit comments

Comments
 (0)