Skip to content

Commit a504aa3

Browse files
authored
Merge pull request #217 from bieba/master
fixes new-item asking for input type
2 parents ccf00b5 + c69a6ba commit a504aa3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: lib/core/cache/Set-IcingaCacheData.psm1

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function Set-IcingaCacheData()
4141
$cacheData = Get-IcingaCacheData -Space $Space -CacheStore $CacheStore;
4242
} else {
4343
try {
44-
New-Item -Path $CacheFile -Force | Out-Null;
44+
New-Item -ItemType File -Path $CacheFile -Force | Out-Null;
4545
} catch {
4646
Exit-IcingaThrowException -InputString $_.Exception -CustomMessage (Get-IcingaCacheDir) -StringPattern 'NewItemUnauthorizedAccessError' -ExceptionType 'Permission' -ExceptionThrown $IcingaExceptions.Permission.CacheFolder;
4747
Exit-IcingaThrowException -CustomMessage $_.Exception -ExceptionType 'Unhandled' -Force;
@@ -66,4 +66,4 @@ function Set-IcingaCacheData()
6666
Exit-IcingaThrowException -InputString $_.Exception -CustomMessage (Get-IcingaCacheDir) -StringPattern 'System.UnauthorizedAccessException' -ExceptionType 'Permission' -ExceptionThrown $IcingaExceptions.Permission.CacheFolder;
6767
Exit-IcingaThrowException -CustomMessage $_.Exception -ExceptionType 'Unhandled' -Force;
6868
}
69-
}
69+
}

0 commit comments

Comments
 (0)