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' {
163
163
Install-PSResource - Name $testModuleClobber2 - Repository $localRepo - TrustRepository - NoClobber - ErrorVariable ev - ErrorAction SilentlyContinue - verbose
164
164
$pkg = Get-InstalledPSResource $testModuleClobber2 - ErrorAction SilentlyContinue
165
165
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 ) {
171
172
# Output the command's name and details
172
173
Write-Verbose - Verbose " Command Name: $ ( $command.Name ) "
173
174
Write-Verbose - Verbose " Command Type: $ ( $command.CommandType ) "
You can’t perform that action at this time.
0 commit comments