Hacker News new | ask | show | jobs
by akx 2091 days ago
The install scripts lack `set -e` (or `set -xeuo pipefail`, which is what I've memorized), so if a command fails, the scripts just keep on steamrolling forward.

Then again, these scripts are clearly tailored for OP, since they contain their name and email, so it's... not like these would be usable as-is for anyone else.

(Also, why is this published on Npm?)

2 comments

I had to deconstruct that since I only use #!/bin/sh -xe

-e : exit immediately if statement has non-zero exit status

-x : echo each command

-u : treat unset variables as an error

-o pipefail : If set, the return value of a pipeline is the value of the last (rightmost) command to exit with a non-zero status, or zero if all commands in the pipeline exit successfully.

that is actually much better than -xe, thank you, I learned something

Yeah I should fix that email stuff somehow. But it's just a good place to keep the GitHub noreply emails. And set -e with option to continue manually somehow good idea.

It's surprising how many people have used these, so they are for others... Improving them makes sense. If your wanna submit some changes and ideas please do :)

I would really appreciate it, and whoever gets them from npm might too.

I think I pushed to npm because I mostly do node and I guess I figured it's an easy backup and way to distribute.:)