Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The installer requires wget #350

Open
hjpotter92 opened this issue Dec 24, 2020 · 1 comment
Open

The installer requires wget #350

hjpotter92 opened this issue Dec 24, 2020 · 1 comment

Comments

@hjpotter92
Copy link

I was setting up nanorc for my newer install on office machine, and I went with the installation script with curl.

However, since I hadn't installed wget on the system, the installation script failed:

➜ curl https://raw.githubusercontent.com/scopatz/nanorc/master/install.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1177  100  1177    0     0   1693      0 --:--:-- --:--:-- --:--:--  1691
main: line 10: wget: command not found
unzip:  cannot find or open /tmp/nanorc.zip, /tmp/nanorc.zip.zip or /tmp/nanorc.zip.ZIP.
mv: cannot stat 'nanorc-master/*': No such file or directory
rm: cannot remove '/tmp/nanorc.zip': No such file or directory
main: line 20: /home/hjpotter92/.nano/nanorc: No such file or directory

The installer should switch between curl or wget accordingly, and it should fail as early as possible. In the output above, it can be seen that despite wget not being found, the installer still attempts to unzip/mv/rm as if previous stages were successful.

@LoganDark
Copy link

LoganDark commented May 8, 2021

As for curl or wget: they should be using curl anyway as it has the widest compatibility.

As for stopping the whole script when an error is encountered: that is impossible when the recommended method of installation is piping input to your shell. see: https://www.seancassidy.me/dont-pipe-to-your-shell.html

However, they can (and should) check the output of each command individually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants