Skip to content

Commit ee70b56

Browse files
🚀 [Refactor]: Initialize contextParamList as an array and append selected installations for improved parallel processing in Connect-GitHubApp.
1 parent cfa2510 commit ee70b56

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/functions/public/Auth/Connect-GitHubApp.ps1‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@
158158
Write-Verbose "Found [$($selectedInstallations.Count)] installations for the target."
159159
$moduleName = $script:Module.Name
160160
$moduleVersion = $script:PSModuleInfo.ModuleVersion
161-
$contextParamList = $selectedInstallations | ForEach-Object -ThrottleLimit $ThrottleLimit -Parallel {
161+
$contextParamList = , @()
162+
$contextParamList += $selectedInstallations | ForEach-Object -ThrottleLimit $ThrottleLimit -Parallel {
162163
Import-Module -Name $using:moduleName -RequiredVersion $using:moduleVersion -Force -ErrorAction Stop
163164
$installation = $_
164165
Write-Verbose "Processing installation [$($installation.Target.Name)] [$($installation.id)]"

0 commit comments

Comments
 (0)