curl usage in install script in sync with instructions #5607
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.
Hi!
This change makes the install script consistent with the installation instructions while keeping
wget
as an alternative.Based on the current installation instructions, one starts with invoking
curl
but the install script gives precedence towget
. It can happen, thatcurl
works on a system, butwget
does not. 1 It is very confusing when the install process starts by downloading the script but then the installer script indicates a network error.In pull request #5096 @AnatoleLucet and @Mic92 introduced support for
wget
during the installation. In it Anatole suggested changing the installation instructions from the currentcurl -L https://nixos.org/nix/install | sh
to one that's usingwget
, but this didn't happen. I simply switched the order of the availability checks to ensure that curl comes first.Footnotes
For example, if the user is behind a proxy and the the environmental variable used is HTTPS_PROXY then
curl
will work, butwget
won't. This is just one example, but as long ascurl
can work andwget
can fail these errors can appear and will be confusing. ↩