Skip to content

fix(scripts): await release asset downloads - #3505

Merged
chenyukang merged 2 commits into
nervosnetwork:developfrom
wangjingshuiku:fix/await-release-asset-downloads
Sep 12, 2026
Merged

chenyukang merged 2 commits into
nervosnetwork:developfrom
wangjingshuiku:fix/await-release-asset-downloads

Conversation

@wangjingshuiku

Copy link
Copy Markdown
Contributor

The release-draft helper starts each asset pipeline inside forEach(async ...), so download() resolves before the pipelines finish and download failures are detached from its promise.

This change awaits Promise.all(assetList.map(...)) and handles the returned top-level promise by reporting the error and setting a non-zero exit code. The script now completes only after every asset has been written.

Validation: node --check scripts/download-binaries-from-release-draft.js.

Signed-off-by: wangjingshuiku <wangjingshuiku@163.com>
@wangjingshuiku

Copy link
Copy Markdown
Contributor Author

Hi @chenyukang, when you have a moment, could you take a look at this PR? Thanks!

It fixes a small issue where the release asset download helper could return before its async download tasks had completed, and download failures could escape the top-level promise.

@chenyukang chenyukang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@chenyukang
chenyukang disabled auto-merge September 12, 2026 10:14
@chenyukang
chenyukang merged commit a926e33 into nervosnetwork:develop Sep 12, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants