fix(install): do not use curl installed through snap #5442
Merged
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.
Description
Changes the install script to check if the resolved
curl
is within/snap
. If it is, the script prints a warning and acts as ifcurl
is not installed, searching for other download programs.Motivation and Context
For some reason,
curl
which comes from the default package on snapcraft is badly broken. Among its deficiencies are:/tmp
results in no file being created at all, even though cURL reports success.While the broken version of the curl program is capable of downloading the install script and piping it to
sh
, we have had strange issues when it is used within the installer (#5403). Given the severity and unpredictability of these problems, I think it is safer to disallow the usage of snap-installed curl until all the outstanding issues are fixed.Closes #5403
How Has This Been Tested?
Tested on a fresh install of Ubuntu 23.04 installed with the non-legacy installer. Script works in default setting (since wget is installed by default), correctly bypassing curl if it is snap-installed and using it if it is apt-installed.
Checklist: