Improve curl options in install scripts
#10
Closed
+24
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR improves the
curloptions used in the Linux and POSIX install scripts.Our Heroku buildpack for Clojure uses these install scripts to install the CLI. We noticed intermittent install failures related to the download of the Clojure tools. I believe most of them could be avoided with a slightly changed curl command line options.
The options used in this PR are based on our Heroku best-practices for curl commands. They are obviously opinionated, so I am happy to adjust as needed. I left some details for each of them below, including curl version compatibility for the more recent
curladditions.I also switched the short-form options
-Oand-Lto their long from equivalents as they are easier to grasp without needing to refer to the man page and for consistency with the newly added options.--connect-timeout 3--fail22for HTTP responses with status codes >=400.--max-time 60--no-progress-meter7.67.0(Nov 2019)--silentand will still output diagnostic information (i.e. retries).--retry-max-time 60--retry 57.12.3(Dec 2004)--retry-connrefused7.52.0(Dec 2016)--retry.