File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
test/InstallPSResourceTests Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -163,11 +163,12 @@ Describe 'Test Install-PSResource for local repositories' -tags 'CI' {
163163 Install-PSResource - Name $testModuleClobber2 - Repository $localRepo - TrustRepository - NoClobber - ErrorVariable ev - ErrorAction SilentlyContinue - verbose
164164 $pkg = Get-InstalledPSResource $testModuleClobber2 - ErrorAction SilentlyContinue
165165
166- # Get the first available module named 'clobbertestmodule1' and its exported commands
167- $module2 = (Get-Module - ListAvailable $testModuleClobber2 )[0 ]
168- $module2Idx = $module [0 ]
169- # Iterate through each exported command in the module
170- foreach ($command in $module2Idx.ExportedCommands.Values ) {
166+ if (! $pkg ) {
167+ # Get the first available module named 'clobbertestmodule1' and its exported commands
168+ $module2 = (Get-Module - ListAvailable $testModuleClobber2 )[0 ]
169+ $module2Idx = $module [0 ]
170+ # Iterate through each exported command in the module
171+ foreach ($command in $module2Idx.ExportedCommands.Values ) {
171172 # Output the command's name and details
172173 Write-Verbose - Verbose " Command Name: $ ( $command.Name ) "
173174 Write-Verbose - Verbose " Command Type: $ ( $command.CommandType ) "
You can’t perform that action at this time.
0 commit comments