You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Fix downloads for @yarnpkg/cli-dist
The changes to make this download script work for both `npm` and `yarn` distributions [#612](#612) has a bug where the requested distribution (`yarn`) differs from its package name if the version is `>=2` (`@yarnpkg/cli-dist`) and that wasn't accounted for in the name of the download file.
The `curl` command that downloads the tarball should have been saving to `yarn-v{x.y.z}.tar.gz` but was instead saving to `@yarnpkg/cli-dist-v{x.y.z}.tar.gz`. This is causing automation failures (e.g.; https://github.com/heroku/buildpacks-nodejs/actions/runs/6179740345/job/16775160336)
This PR keeps the `distribution_name` and `package_name` separate so this mismatch will no longer happen.
It also:
- adds some extra logging which would have made the error more obvious
- DRYS up the `npm_url`, ``tarball_url`, and `downloaded_tarball` which previously were being inlined into commands
- adds retries and timeouts to `curl`
0 commit comments