provisioner/powershell: Don't over complicate removal of tmp output file

pull/4459/head
DanHam 9 years ago
parent 21be983855
commit 370b67497e
No known key found for this signature in database
GPG Key ID: 58E79AEDD6AA987E

@ -82,11 +82,7 @@ do {
} while (!($t.state -eq 3))
$result = $t.LastTaskResult
if (Test-Path $log) {
try {
Takeown /F $log | Out-Null
Icacls $log /Grant:r Administrators:F /c /q 2>&1 | Out-Null
Remove-Item $log -Force -ErrorAction SilentlyContinue | Out-Null
} catch { $Global:Error.RemoveAt(0) }
}
[System.Runtime.Interopservices.Marshal]::ReleaseComObject($s) | Out-Null
exit $result`))

Loading…
Cancel
Save