Skip to content

Commit

Permalink
Merge pull request #217 from bieba/master
Browse files Browse the repository at this point in the history
fixes new-item asking for input type
  • Loading branch information
LordHepipud authored Mar 1, 2021
2 parents ccf00b5 + c69a6ba commit a504aa3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/core/cache/Set-IcingaCacheData.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function Set-IcingaCacheData()
$cacheData = Get-IcingaCacheData -Space $Space -CacheStore $CacheStore;
} else {
try {
New-Item -Path $CacheFile -Force | Out-Null;
New-Item -ItemType File -Path $CacheFile -Force | Out-Null;
} catch {
Exit-IcingaThrowException -InputString $_.Exception -CustomMessage (Get-IcingaCacheDir) -StringPattern 'NewItemUnauthorizedAccessError' -ExceptionType 'Permission' -ExceptionThrown $IcingaExceptions.Permission.CacheFolder;
Exit-IcingaThrowException -CustomMessage $_.Exception -ExceptionType 'Unhandled' -Force;
Expand All @@ -66,4 +66,4 @@ function Set-IcingaCacheData()
Exit-IcingaThrowException -InputString $_.Exception -CustomMessage (Get-IcingaCacheDir) -StringPattern 'System.UnauthorizedAccessException' -ExceptionType 'Permission' -ExceptionThrown $IcingaExceptions.Permission.CacheFolder;
Exit-IcingaThrowException -CustomMessage $_.Exception -ExceptionType 'Unhandled' -Force;
}
}
}

0 comments on commit a504aa3

Please sign in to comment.