Add guard for root bash install (#92)

* Add guard for root bash install

* Bump to version 1.2.5
This commit is contained in:
Rico Tiongson 2020-05-12 09:46:31 +08:00 committed by GitHub
parent 7728495350
commit 99f659c9db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -1 +1 @@
v1.2.4 v1.2.5

View File

@ -2,6 +2,11 @@
set -e set -e
if [[ "$USER" == root ]]; then
echo "Please run 'bash install' as non-root user" 2>&1
exit 1
fi
DIR="$(dirname "$0")" DIR="$(dirname "$0")"
VERSION="$(cat $DIR/VERSION | tr -d '[:space:]')" VERSION="$(cat $DIR/VERSION | tr -d '[:space:]')"