Return error code when running as user

This commit is contained in:
T. Joseph Carter 2016-12-09 14:11:54 -08:00
parent 02ebf26cf2
commit a939111f6a

View File

@ -87,7 +87,7 @@ fi
if [[ "$UID" != "0" ]]; then if [[ "$UID" != "0" ]]; then
if hash sudo 2>/dev/null; then if hash sudo 2>/dev/null; then
Run sudo $0 "$@" Run sudo $0 "$@"
exit 0 exit $?
else else
printf "%s requires \"root\" administrator access to upgrade your system.\n" "$PROGRAM" printf "%s requires \"root\" administrator access to upgrade your system.\n" "$PROGRAM"
exit 1 exit 1