Skip to content

Commit 4efac72

Browse files
committed
chore: Write PSModulePath to debug logs in Invoke-DscCacheRefresh
1 parent cac542f commit 4efac72

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

powershell-adapter/psDscAdapter/psDscAdapter.psm1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ function Invoke-DscCacheRefresh {
3838
$Module
3939
)
4040

41-
# cache the results of Get-DscResource
41+
# write psmodulepath to debug logs
42+
$trace = @{'Debug' = 'PSModulePath:' + $env:PSModulePath } | ConvertTo-Json -Compress
43+
$host.ui.WriteErrorLine($trace)
44+
45+
# create a list object to store cache of Get-DscResource
4246
[dscResourceCache[]]$dscResourceCache = [System.Collections.Generic.List[Object]]::new()
4347

4448
# improve by performance by having the option to only get details for named modules

0 commit comments

Comments
 (0)