alexmarcoo/open-in-native-client

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

Opened this issue · 0 comments

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.