File tree 2 files changed +12
-2
lines changed
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -92,8 +92,13 @@ function InstallActionModule {
92
92
$ (Get-Content $_.FullName - Raw) -match ' ModuleVersion'
93
93
}
94
94
if (-not $moduleInWorkspace ) {
95
- Install-Module $moduleToInstall - Scope CurrentUser - Force
95
+ $availableModules = Get-Module - ListAvailable
96
+ if ($availableModules.Name -notcontains $moduleToInstall ) {
97
+ Install-Module $moduleToInstall - Scope CurrentUser - Force - AcceptLicense - AllowClobber
98
+ }
96
99
Import-Module $moduleToInstall - Force - PassThru | Out-Host
100
+ } else {
101
+ Import-Module $moduleInWorkspace.FullName - Force - PassThru | Out-Host
97
102
}
98
103
}
99
104
function ImportActionModule {
Original file line number Diff line number Diff line change @@ -185,8 +185,13 @@ runs:
185
185
$(Get-Content $_.FullName -Raw) -match 'ModuleVersion'
186
186
}
187
187
if (-not $moduleInWorkspace) {
188
- Install-Module $moduleToInstall -Scope CurrentUser -Force
188
+ $availableModules = Get-Module -ListAvailable
189
+ if ($availableModules.Name -notcontains $moduleToInstall) {
190
+ Install-Module $moduleToInstall -Scope CurrentUser -Force -AcceptLicense -AllowClobber
191
+ }
189
192
Import-Module $moduleToInstall -Force -PassThru | Out-Host
193
+ } else {
194
+ Import-Module $moduleInWorkspace.FullName -Force -PassThru | Out-Host
190
195
}
191
196
}
192
197
function ImportActionModule {
You can’t perform that action at this time.
0 commit comments