Skip to content

Commit

Permalink
Merge pull request #80 from AArnott/fix79
Browse files Browse the repository at this point in the history
Adapt to GitHub's new env and path operations
  • Loading branch information
pr-autocomplete[bot] authored Nov 16, 2020
2 parents d4b9a6a + d8b3fc0 commit f4976e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion azure-pipelines/variables/_pipelines.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# and the second that works across jobs and stages but must be fully qualified when referenced.
Write-Host "##vso[task.setvariable variable=$keyCaps;isOutput=true]$($_.Value)"
} elseif ($env:GITHUB_ACTIONS) {
Write-Host "::set-env name=$keyCaps::$($_.Value)"
Add-Content -Path $env:GITHUB_ENV -Value "$keyCaps=$($_.Value)"
}
Set-Item -Path "env:$keyCaps" -Value $_.Value
}
Expand Down
4 changes: 2 additions & 2 deletions tools/Set-EnvVars.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ $Variables.GetEnumerator() |% {
Write-Host "##vso[task.setvariable variable=$($_.Key);]$($_.Value)"
}
if ($env:GITHUB_ACTIONS) {
Write-Host "::set-env name=$($_.Key)::$($_.Value)"
Add-Content -Path $env:GITHUB_ENV -Value "$($_.Key)=$($_.Value)"
}

if ($cmdInstructions) {
Expand All @@ -79,7 +79,7 @@ if ($PrependPath) {
Write-Host "##vso[task.prependpath]$_"
}
if ($env:GITHUB_ACTIONS) {
Write-Host "::add-path::$_"
Add-Content -Path $env:GITHUB_PATH -Value $_
}

$CmdEnvScript += "SET PATH=$_$pathDelimiter%PATH%"
Expand Down

0 comments on commit f4976e4

Please sign in to comment.