brave / brave/install.sh

Add support for the broken Snap version of curl

Open
#83 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Shell
Stars
2
Forks
9
PR merge metrics
No merged PRs in 30d

Description

When installed as a snap:
```
sudo snap install curl
```

`curl` will prepend the downloaded data with a text warning on STDOUT:
```
$ /snap/bin/curl -fSs fmarier.org

Caution: You are using the Snap version of curl.
Due to Snap's sandbox nature, this version has some limitations.
For example, it may not be able to access hidden folders in your home directory
or other restricted areas of the os.
This means you may encounter errors when using snap curl to download files.
For those case, you might want to use the native curl package.
For details, see: https://github.com/boukendesho/curl-snap/issues/1

To stop seeing this message, run the following command:
curl.snap-acked

301 Moved Permanently

Moved Permanently


The document has moved here.

```
which cannot be automatically suppressed by piping to a file.

If we can detect that somehow, it would be nice to error out early with a helpful error message as well as the fix, i.e. running:
```
curl.snap-acked
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading install.sh and tracing how it invokes curl. Check how the script could identify the Snap-provided curl before downloading, then define the failure path around the warning and the suggested curl.snap-acked command. Done means the broken Snap version is detected early and the user receives a helpful remediation message.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.