Skip to content

Commit

Permalink
Emit GitHub errors
Browse files Browse the repository at this point in the history
Emit errors as GitHub Actions output messages, rather than just output to the PowerShell host.
  • Loading branch information
martincostello committed Jan 14, 2025
1 parent a1e9279 commit 80991c0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/update-dotnet-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ jobs:
dotnet tool install --global dotnet-outdated-tool --version "$env:DOTNET_OUTDATED_VERSION"
if ($LASTEXITCODE -ne 0) {
Write-Host "dotnet tool install failed with code ${LASTEXITCODE}"
Write-Output "::error::dotnet tool install failed with code ${LASTEXITCODE}"
exit 1
}
Expand Down Expand Up @@ -325,7 +325,7 @@ jobs:
Write-Host "Restoring .NET tools..."
dotnet tool restore
if ($LASTEXITCODE -ne 0) {
Write-Host "dotnet tool restore failed with code ${LASTEXITCODE}"
Write-Output "::error::dotnet tool restore failed with code ${LASTEXITCODE}"
exit 1
}
}
Expand Down Expand Up @@ -357,7 +357,7 @@ jobs:
Write-Host "Restoring .NET workloads..."
dotnet workload restore
if ($LASTEXITCODE -ne 0) {
Write-Host "dotnet workfload restore failed with code ${LASTEXITCODE}"
Write-Output "::error::dotnet workfload restore failed with code ${LASTEXITCODE}"
exit 1
}
}
Expand All @@ -370,7 +370,7 @@ jobs:
dotnet restore
if ($LASTEXITCODE -ne 0) {
Write-Host "dotnet restore failed with code ${LASTEXITCODE}"
Write-Output "::error::dotnet restore failed with code ${LASTEXITCODE}"
exit 1
}
Expand All @@ -388,7 +388,7 @@ jobs:
$additionalArguments
if ($LASTEXITCODE -ne 0) {
Write-Host "dotnet outdated failed with code ${LASTEXITCODE}"
Write-Output "::error::dotnet outdated failed with code ${LASTEXITCODE}"
exit 1
}
Expand Down

0 comments on commit 80991c0

Please sign in to comment.