mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2026-02-03 04:09:29 -05:00
Fixes exception on update file removal
This commit is contained in:
parent
1b3a12597a
commit
72157d3a7f
1 changed files with 3 additions and 1 deletions
|
|
@ -8,7 +8,9 @@ function Set-IcingaForWindowsManagementConsoleUpdating()
|
|||
|
||||
$UpdateFile = Join-Path -Path (Get-IcingaCacheDir) -ChildPath 'framework.update';
|
||||
if ($Completed) {
|
||||
Remove-ItemSecure -Path $UpdateFile -Force -Retries 5 | Out-Null;
|
||||
if (Test-IcingaForWindowsManagementConsoleUpdating) {
|
||||
Remove-ItemSecure -Path $UpdateFile -Force -Retries 5 | Out-Null;
|
||||
}
|
||||
} else {
|
||||
New-Item -Path $UpdateFile -ItemType File -Force | Out-Null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue