File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
hugoalh.GitHubActionsToolkit/module Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -121,20 +121,19 @@ Function Set-EnvironmentVariable {
121121 }
122122 End {
123123 If ($Result.Count -igt 0 ) {
124- [PSCustomObject []]$ResultEnumerator = $Result.GetEnumerator ()
125124 Switch - Exact ($Scope.ToString () - isplit ' , ' ) {
126125 ' Current' {
127- $ResultEnumerator | ForEach-Object - Process {
126+ $Result .GetEnumerator () | ForEach-Object - Process {
128127 [System.Environment ]::SetEnvironmentVariable($_.Name , $_.Value ) | Out-Null
129128 }
130129 }
131130 ' Subsequent' {
132131 If ($Null -ieq $Env: GITHUB_ENV ) {
133- $ResultEnumerator | ForEach-Object - Process {
134- Write-GitHubActionsCommand - Command ' set-env' - Parameter @ { ' name' = $Item .Name } - Value $Item .Value
132+ $Result .GetEnumerator () | ForEach-Object - Process {
133+ Write-GitHubActionsCommand - Command ' set-env' - Parameter @ { ' name' = $_ .Name } - Value $_ .Value
135134 }
136135 } Else {
137- Add-Content - LiteralPath $Env: GITHUB_ENV - Value (($ResultEnumerator | ForEach-Object - Process {
136+ Add-Content - LiteralPath $Env: GITHUB_ENV - Value (($Result .GetEnumerator () | ForEach-Object - Process {
138137 Return " $ ( $_.Name ) =$ ( $_.Value ) "
139138 }) -join " `n " ) - Confirm:$False - Encoding ' UTF8NoBOM'
140139 }
You can’t perform that action at this time.
0 commit comments