Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix downloads for @yarnpkg/cli-dist (#647)
* 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`
- Loading branch information