Skip to content

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

Open
wangjingshuiku wants to merge 1 commit into
nervosnetwork:developfrom
wangjingshuiku:fix/await-release-asset-downloads
Open

fix(scripts): await release asset downloads#3505
wangjingshuiku wants to merge 1 commit into
nervosnetwork:developfrom
wangjingshuiku:fix/await-release-asset-downloads

Conversation

@wangjingshuiku

Copy link
Copy Markdown

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>
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.

1 participant