We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32015c7 commit 9366b56Copy full SHA for 9366b56
powershell-adapter/psDscAdapter/psDscAdapter.psm1
@@ -39,11 +39,14 @@ function Invoke-DscCacheRefresh {
39
40
$refreshCache = $false
41
42
- if ($IsWindows) {
43
- $cacheFilePath = Join-Path $env:LocalAppData "dscv3classcache.json"
+ $cacheFileSuffix = ".json"
+ if ($PSVersionTable.PSVersion.Major -le 5) {
44
+ $cacheFileSuffix = "-v5.json"
45
}
- else {
46
- $cacheFilePath = Join-Path $env:HOME ".dsc" "dscv3classcache.json"
+
47
+ $cacheFilePath = Join-Path $env:LocalAppData "dscv3classcache$cacheFileSuffix"
48
+ if ($IsLinux -or $IsMacOS) {
49
+ $cacheFilePath = Join-Path $env:HOME ".dsc" "dscv3classcache$cacheFileSuffix"
50
51
52
if (Test-Path $cacheFilePath) {
0 commit comments