Skip to content

Commit 097c063

Browse files
committed
(re sh) Handle redirects gracefully; safer sh -c
1 parent 0e9c466 commit 097c063

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ fisher remove chvolkmann/code-connect
6666
With [`shell/install.sh`](./shell/install.sh)
6767

6868
```sh
69-
curl -sS https://raw.githubusercontent.com/chvolkmann/code-connect/main/shell/install.sh | sh
69+
sh -c "$(curl -sSLo- https://raw.githubusercontent.com/chvolkmann/code-connect/main/shell/install.sh)"
7070
```
7171

7272
This downloads [`code_connect.py`](./bin/code_connect.py) along with two scripts and sets up aliases in your `.bashrc` for you. See [`shell/code.sh`](./shell/code.sh) and [`shell/code-connect.sh`](./shell/code-connect.sh)
@@ -76,7 +76,7 @@ This downloads [`code_connect.py`](./bin/code_connect.py) along with two scripts
7676
With [`shell/uninstall.sh`](./shell/uninstall.sh)
7777

7878
```sh
79-
curl -sS https://raw.githubusercontent.com/chvolkmann/code-connect/main/shell/uninstall.sh | sh
79+
sh -c "$(curl -sSLo- https://raw.githubusercontent.com/chvolkmann/code-connect/main/shell/uninstall.sh)"
8080
```
8181

8282
Deletes the aliases from `~/.bashrc` and removes the folder `~/.code-connect`

conf.d/code-connect.fish

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
function _on_code-connect_install --on-event code-connect_install
66
mkdir -p ~/.code-connect/bin
7-
curl -sS "https://raw.githubusercontent.com/chvolkmann/code-connect/main/bin/code_connect.py" >~/.code-connect/bin/code_connect.py
7+
curl -sSL "https://raw.githubusercontent.com/chvolkmann/code-connect/main/bin/code_connect.py" >~/.code-connect/bin/code_connect.py
88
chmod +x ~/.code-connect/bin/code_connect.py
99
end
1010

shell/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ download_repo_file () {
4343
log "Downloading ${c_path}$repo_path${c_log} from ${c_path}$url"
4444
fi
4545

46-
curl -sS -o "$output_path" "$url"
46+
curl -sSL -o "$output_path" "$url"
4747
ret="$?"
4848
if test "$ret" != "0"; then
4949
error "ERROR: Could not fetch ${c_path}$url${c_err}"

0 commit comments

Comments
 (0)