fix(publish): surface osslsigncode output when verify fails#314
Conversation
Drop set -e from the verify step so the assignment of osslsigncode's captured stderr/stdout no longer aborts the script before echoing it. Track exit codes per file and aggregate so both binaries are reported even if the first fails. Also fail with ::error:: annotations for visibility in the Actions UI.
Greptile SummaryThis PR fixes silent failure in the
Confidence Score: 5/5Safe to merge — the change is confined to one CI step and all failure paths are now explicitly handled. The root cause (silent No files require special attention; Important Files Changed
Reviews (1): Last reviewed commit: "fix(publish): surface osslsigncode outpu..." | Re-trigger Greptile |
Problem
On the rerun of `20.2.0-rc.1` the SignPath step finally succeeded — SignPath confirmed "The signing request was successfully processed" — but the next step, `Verify Windows signatures`, fails with no diagnostic. The job log goes from the verify step's `set -uo pipefail` setup straight to `Process completed with exit code 1` in ~0.3s, which is way too short for `osslsigncode` to have run on two ~30 MB binaries.
Root cause
The current script:
```bash
set -euo pipefail
verify_signature() {
local file="$1"
local output
output="$(osslsigncode verify -in "$file" 2>&1)"
echo "$output"
...
}
```
`output="$(osslsigncode ...)"` captures both stdout and stderr, but under `set -e` the assignment inherits the subshell's exit code. When osslsigncode exits non-zero (e.g. CA chain not trusted by the runner — likely on the current `test-signing` policy), the assignment fails and `set -e` aborts the function before `echo "$output"` runs. The captured output is discarded and we get a bare `exit 1`.
Fix
Test plan
Upstream
Companion PR will land on `appwrite/sdk-generator` (`templates/cli/.github/workflows/publish.yml`) so the next CLI regeneration carries the same fix.