alexmarcoo / open-in-native-client

GNU General Public License v3.0
120 stars 49 forks source link

uninstall.sh execs "rm -r ~/", wiping everything #11

Open pzmarzly opened 4 years ago

pzmarzly commented 4 years ago

I removed the bundled node.js, as I thought it wouldn't be needed for anything. But as it turned out, only uninstall.sh uses it, and that script ignores all errors, so if it doesn't find node.js, then id is null, and the script starts wiping home directory instead of ~/$id.

Fix: add set -eu to the start of all your Bash scripts. Then maybe make uninstall.sh use system-wide node installation, to match install.sh behavior.