Skip to content

Commit 515589d

Browse files
committed
Log errors in Invoke-CleanupTempFiles instead of exiting
1 parent a16d948 commit 515589d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

extension/BuildPhpExtension/private/Invoke-CleanupTempFIles.ps1

+5-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ Function Invoke-CleanupTempFiles {
99
Write-Host "Cleaning up temporary files"
1010
$tempFiles | ForEach-Object {
1111
Write-Host "Removing $($_.FullName)"
12-
Remove-Item -Path $_.FullName -Force
12+
try {
13+
Remove-Item -Path $_.FullName -Force
14+
} catch {
15+
Write-Host "Failed to remove $($_.FullName)"
16+
}
1317
}
1418
}
1519
}

0 commit comments

Comments
 (0)