Skip to content

Commit b48e5cf

Browse files
committed
ci: tee output
1 parent f50140b commit b48e5cf

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

cli/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ runs:
9999
fi
100100
101101
set +e
102-
output=$(slack $args 2>&1)
102+
output=$(slack $args 2>&1 | tee /dev/stderr)
103103
exit_code=$?
104104
set -e
105105
@@ -139,10 +139,10 @@ runs:
139139
}
140140
141141
Write-Output "DEBUG: Running: slack $args"
142-
$output = slack $args.Split(' ') 2>&1 | Out-String
142+
$outputFile = New-TemporaryFile
143+
slack $args.Split(' ') 2>&1 | Tee-Object -FilePath $outputFile.FullName
143144
$exit_code = $LASTEXITCODE
144-
145-
Write-Output $output
145+
$output = Get-Content $outputFile.FullName -Raw
146146
147147
"ok=$( if ($exit_code -eq 0) { 'true' } else { 'false' } )" >> $env:GITHUB_OUTPUT
148148
"time=$([DateTimeOffset]::UtcNow.ToUnixTimeSeconds())" >> $env:GITHUB_OUTPUT

0 commit comments

Comments
 (0)