ellipsis/ellipsis

`curl ellipsis.sh | sh` does not follow 301 from http://ellipsis.sh to https://ellipsis.sh

Closed this issue · 0 comments

Expected Behavior

curl ellipsis.sh | sh downloads and executes the installer.

Current Behavior

$ curl ellipsis.sh | sh
sh: line 1: Redirecting: command not found

$ curl ellipsis.sh
Redirecting to https://ellipsis.sh/

Failure Information (for bugs)

This bug seems to be caused by the 301 from http://ellipsis.sh to https://ellipsis.sh

$ curl -v ellipsis.sh
*   Trying 54.84.236.175:80...
* Connected to ellipsis.sh (54.84.236.175) port 80 (#0)
> GET / HTTP/1.1
> Host: ellipsis.sh
> User-Agent: curl/7.88.1-DEV
> Accept: */*
> 
< HTTP/1.1 301 Moved Permanently
< Location: https://ellipsis.sh/
< Server: Netlify
< X-Nf-Request-Id: 01GSVDWRYJ9VPBP23R21TYZJBE
< Date: Wed, 22 Feb 2023 02:05:31 GMT
< Content-Length: 35
< Content-Type: text/plain; charset=utf-8
< 
* Connection #0 to host ellipsis.sh left intact
Redirecting to https://ellipsis.sh/

Context

$ curl -V   
curl 7.88.1-DEV (x86_64-pc-linux-gnu) libcurl/7.88.1-DEV OpenSSL/3.0.8 zlib/1.2.13 brotli/1.0.9 zstd/1.5.2 libidn2/2.3.4 libpsl/0.21.2 (+libidn2/2.3.4) libssh2/1.10.0 nghttp2/1.52.0
Release-Date: [unreleased]
Protocols: dict file ftp ftps gopher gophers http https imap imaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd
$ sh --version
GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ hostnamectl
 Operating System: Arch Linux                      
          Kernel: Linux 6.1.12-arch1-1
    Architecture: x86-64

Fixes

curl -L fixed this for me. You could also fix this by using curl https://ellipsis.sh | sh

$ curl -L ellipsis.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    35  100    35    0     0    350      0 --:--:-- --:--:-- --:--:--   353
100  9762  100  9762    0     0  43909      0 --:--:-- --:--:-- --:--:-- 43909
Cloning into 'tmp-3EBu9I/ellipsis'...
remote: Enumerating objects: 73, done.
remote: Counting objects: 100% (73/73), done.
remote: Compressing objects: 100% (68/68), done.
remote: Total 73 (delta 2), reused 28 (delta 1), pack-reused 0
Receiving objects: 100% (73/73), 49.30 KiB | 2.90 MiB/s, done.
Resolving deltas: 100% (2/2), done.

                                   ~ fin ~
   _    _    _
  /\_\ /\_\ /\_\
  \/_/ \/_/ \/_/                         …because $HOME is where the <3 is!

Be sure to add `export PATH=~/.ellipsis/bin:$PATH` to your bashrc or zshrc.

Run `ellipsis install <package>` to install a new package.
Run `ellipsis search <query>` to search for packages to install.
Run `ellipsis help` for additional options.

Check http://docs.ellipsis.sh/pkgindex for available packages!