Skip to content

Commit 91b9923

Browse files
Clarify outputs debug presence logging
1 parent e11b3ec commit 91b9923

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/outputs.ps1

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,21 @@ try {
1616
Write-Debug "[$scriptName] - ShowRateLimit: $showRateLimit"
1717

1818
$result = $null
19+
$hasResult = $false
1920
if ($showOutput) {
2021
$result = (Get-GitHubOutput).result
21-
Write-Debug "[$scriptName] - Result: $(-not $result)"
22+
$hasResult = [bool]$result
23+
Write-Debug "[$scriptName] - ResultPresent: $hasResult"
2224
}
2325

24-
if (-not $result -and -not $showRateLimit) {
26+
if (-not $hasResult -and -not $showRateLimit) {
2527
return
2628
}
2729

2830
$fenceStart = "┏━━┫ $fenceTitle - Outputs ┣━━━━━┓"
2931
Write-Output $fenceStart
3032

31-
if ($result) {
33+
if ($hasResult) {
3234
if ([string]::IsNullOrEmpty($env:GITHUB_ACTION)) {
3335
Write-GitHubWarning 'Outputs cannot be accessed as the step has no ID.'
3436
}

0 commit comments

Comments
 (0)