contrib/install-system-wide in rvm-1.1.3 vs contrib/install-system-wide in rvm-1.1.4
- old
+ new
@@ -83,11 +83,11 @@
}
os_type="$(uname)"
# Require root to install it.
-if [[ "$(whoami)" != "root" ]]; then
+if [[ $(id -u) -ne 0 ]]; then
echo "Please rerun this installer as root." >&2
exit 1
# Check for the presence of git.
elif [[ -z "$(command -v git)" ]] ; then
@@ -152,10 +152,10 @@
export rvm_selfcontained=0
rvm_group_name="${rvm_group_name:-"rvm"}"
__rvm_create_user_group "$rvm_group_name"
-__rvm_add_user_to_group "$(whoami)" "$rvm_group_name"
+__rvm_add_user_to_group "$USER" "$rvm_group_name"
echo "Creating the destination dir and making sure the permissions are correct"
mkdir -p "$rvm_path"
__rvm_system_wide_permissions "$rvm_path"