@@ -147,14 +147,16 @@ Describe 'Test Install-PSResource for local repositories' -tags 'CI' {
147147
148148
149149 # Get the first available module named 'clobbertestmodule1' and its exported commands
150- $module = (Get-Module - ListAvailable $testModuleClobber )[0 ]
150+ $module = (Get-Module - ListAvailable $testModuleClobber )
151+ Write-Verbose - Verbose " Module Name: $ ( $module.Name ) "
152+ $moduleIdx = $module [0 ]
151153
152154 # Iterate through each exported command in the module
153- foreach ($command in $module .ExportedCommands.Values ) {
155+ foreach ($command in $moduleIdx .ExportedCommands.Values ) {
154156 # Output the command's name and details
155- Write-Output " Command Name: $ ( $command.Name ) "
156- Write-Output " Command Type: $ ( $command.CommandType ) "
157- Write-Output " ----------------------------------"
157+ Write-Verbose - Verbose " Command Name: $ ( $command.Name ) "
158+ Write-Verbose - Verbose " Command Type: $ ( $command.CommandType ) "
159+ Write-Verbose - Verbose " ----------------------------------"
158160 }
159161
160162
@@ -163,13 +165,13 @@ Describe 'Test Install-PSResource for local repositories' -tags 'CI' {
163165
164166 # Get the first available module named 'clobbertestmodule1' and its exported commands
165167 $module2 = (Get-Module - ListAvailable $testModuleClobber2 )[0 ]
166-
168+ $module2Idx = $module [ 0 ]
167169 # Iterate through each exported command in the module
168- foreach ($command in $module2 .ExportedCommands.Values ) {
170+ foreach ($command in $module2Idx .ExportedCommands.Values ) {
169171 # Output the command's name and details
170- Write-Output " Command Name: $ ( $command.Name ) "
171- Write-Output " Command Type: $ ( $command.CommandType ) "
172- Write-Output " ----------------------------------"
172+ Write-Verbose - Verbose " Command Name: $ ( $command.Name ) "
173+ Write-Verbose - Verbose " Command Type: $ ( $command.CommandType ) "
174+ Write-Verbose - Verbose " ----------------------------------"
173175 }
174176
175177 $pkg | Should - BeNullOrEmpty
0 commit comments