Skip to content

Conversation

@Malax
Copy link

@Malax Malax commented Jan 26, 2026

This PR improves the curl options 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 curl additions.

I also switched the short-form options -O and -L to 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.

Option Introduced Rationale
--connect-timeout 3 - Prevents hanging when server is unreachable.
--fail - Exit with error code 22 for HTTP responses with status codes >= 400.
--max-time 60 - Prevents hanging indefinitely with slow/stalling connections.
--no-progress-meter curl 7.67.0 (Nov 2019) Cleaner output. But less drastic than --silent and will still output diagnostic information (i.e. retries).
--retry-max-time 60 - Prevents hanging indefinitely with slow/stalling connections.
--retry 5 curl 7.12.3 (Dec 2004) Retry up to 5 times on transient errors.
--retry-connrefused curl 7.52.0 (Dec 2016) Consider connection refused as a transient error for --retry.

@Malax
Copy link
Author

Malax commented Jan 26, 2026

I just saw that other PRs were closed with "we don't support pull-requests for this project". I will close the PR, sorry for the noise.

@Malax Malax closed this Jan 26, 2026
@edmorley
Copy link

Perhaps it would be worth mentioning "no PRs" via a GitHub PR template:
https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository

Or at least in a CONTRIBUTING.md?
https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors

Also, in the README of this repo there is a "How to contribute" link that points at:
https://clojure.org/community/contributing

Which currently says:

All of the content is stored in GitHub and pull requests and issues are accepted.

...which seems out of date (or at least not accurate for this repo?).

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