Commit 4dc6f2b
committed
fix(publish): make retry_publish surface failure output under bash -e
Both retry_publish functions captured command output via:
output=$("$@" 2>&1)
rc=$?
echo "$output"
GitHub Actions launches bash with -e (errexit). Under set -e, a failing
command substitution can terminate the script before the next line runs.
That meant when vsce or ovsx returned non-zero, the script died at the
`output=$(...)` line — neither the captured output nor the retry/
classification logic ever executed. The job just exited with code 1
showing only the '##[group]vsce publish attempt 1/5' header.
The previous single-target version of this workflow had the same bug
latent; it never triggered because vsce always succeeded for that flow.
The new multi-target run hit a real vsce failure and the bug ate the
diagnostic.
Replace the bare assignment with an explicit if/else, which set -e is
documented to handle correctly:
if output=$("$@" 2>&1); then rc=0; else rc=$?; fi
echo "$output"
No version bump — 0.2.2 was never on the Marketplace (vsce publish
silently failed for all 4 targets), so the prepare gate will let a
re-run through. ovsx already has 0.2.2 for all targets and will return
'already exists' which retry_publish treats as idempotent success.1 parent 46ea89b commit 4dc6f2b
1 file changed
Lines changed: 12 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
243 | | - | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
244 | 248 | | |
245 | 249 | | |
246 | 250 | | |
| |||
302 | 306 | | |
303 | 307 | | |
304 | 308 | | |
305 | | - | |
306 | | - | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
307 | 315 | | |
308 | 316 | | |
309 | 317 | | |
| |||
0 commit comments