Skip to content

Commit 42fd985

Browse files
committed
20220623A
1 parent 9ccd482 commit 42fd985

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@
457457
*.rdx binary
458458
*.reason binary
459459
*.rel binary
460-
*.res text
460+
*.res text
461461
*.rgbe binary
462462
*.rm binary
463463
*.rmd text

hugoalh.GitHubActionsToolkit/module/step-summary.psm1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ Function Add-StepSummary {
2323
[Switch]$NoNewLine
2424
)
2525
Begin {
26-
If (!(Test-GitHubActionsEnvironment -StepSummary)) {
27-
Return (Write-Error -Message 'Unable to get GitHub Actions step summary resources!' -Category 'ResourceUnavailable')
28-
}
2926
[String[]]$Result = @()
3027
}
3128
Process {
@@ -34,6 +31,9 @@ Function Add-StepSummary {
3431
}
3532
}
3633
End {
34+
If (!(Test-GitHubActionsEnvironment -StepSummary)) {
35+
Return (Write-Error -Message 'Unable to get GitHub Actions step summary resources!' -Category 'ResourceUnavailable')
36+
}
3737
If ($Result.Count -igt 0) {
3838
Add-Content -LiteralPath $Env:GITHUB_STEP_SUMMARY -Value ($Result -join "`n") -Confirm:$False -NoNewline:$NoNewLine -Encoding 'UTF8NoBOM'
3939
}
@@ -259,9 +259,6 @@ Function Set-StepSummary {
259259
[Switch]$NoNewLine
260260
)
261261
Begin {
262-
If (!(Test-GitHubActionsEnvironment -StepSummary)) {
263-
Return (Write-Error -Message 'Unable to get GitHub Actions step summary resources!' -Category 'ResourceUnavailable')
264-
}
265262
[String[]]$Result = @()
266263
}
267264
Process {
@@ -270,6 +267,9 @@ Function Set-StepSummary {
270267
}
271268
}
272269
End {
270+
If (!(Test-GitHubActionsEnvironment -StepSummary)) {
271+
Return (Write-Error -Message 'Unable to get GitHub Actions step summary resources!' -Category 'ResourceUnavailable')
272+
}
273273
If ($Result.Count -igt 0) {
274274
Set-Content -LiteralPath $Env:GITHUB_STEP_SUMMARY -Value ($Result -join "`n") -Confirm:$False -NoNewline:$NoNewLine -Encoding 'UTF8NoBOM'
275275
}

0 commit comments

Comments
 (0)