Skip to content

Commit 86bd66d

Browse files
author
Andrew
committed
Merge branch 'ps_cache' of https://github.com/anmenaga/DSC-New into ps_cache
2 parents 51c3cc4 + 0f72693 commit 86bd66d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

powershell-adapter/Tests/powershellgroup.config.tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Describe 'PowerShell adapter resource tests' {
1313
$winpsConfigPath = Join-path $PSScriptRoot "winps_resource.dsc.yaml"
1414

1515
if ($IsLinux -or $IsMacOS) {
16-
$cacheFilePath = Join-Path $env:HOME "dsc" "PSAdapterCache.json"
16+
$cacheFilePath = Join-Path $env:HOME ".dsc" "PSAdapterCache.json"
1717
}
1818
else
1919
{

powershell-adapter/Tests/powershellgroup.resource.tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Describe 'PowerShell adapter resource tests' {
1111
$env:PSModulePath += [System.IO.Path]::PathSeparator + $PSScriptRoot
1212

1313
if ($IsLinux -or $IsMacOS) {
14-
$cacheFilePath = Join-Path $env:HOME "dsc" "PSAdapterCache.json"
14+
$cacheFilePath = Join-Path $env:HOME ".dsc" "PSAdapterCache.json"
1515
}
1616
else
1717
{

powershell-adapter/psDscAdapter/psDscAdapter.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function Invoke-DscCacheRefresh {
4444
$cacheFilePath = Join-Path $env:LocalAppData "dsc\WindowsPSAdapterCache.json"
4545
}
4646
if ($IsLinux -or $IsMacOS) {
47-
$cacheFilePath = Join-Path $env:HOME "dsc" "PSAdapterCache.json"
47+
$cacheFilePath = Join-Path $env:HOME ".dsc" "PSAdapterCache.json"
4848
}
4949

5050
if (Test-Path $cacheFilePath) {
@@ -203,7 +203,7 @@ function Invoke-DscCacheRefresh {
203203

204204
# fill in resource files (and their last-write-times) that will be used for up-do-date checks
205205
$lastWriteTimes = @{}
206-
Get-ChildItem -Recurse -File -Path $dscResource.ParentPath -Include "*.ps1","*.psd1","*psm1","*.mof" -ea SilentlyContinue | % {
206+
Get-ChildItem -Recurse -File -Path $dscResource.ParentPath -Include "*.ps1","*.psd1","*psm1","*.mof" -ea Ignore | % {
207207
$lastWriteTimes.Add($_.FullName, $_.LastWriteTime)
208208
}
209209

0 commit comments

Comments
 (0)