File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -348,7 +348,7 @@ function check_binary() {
348
348
# ARGS: $1 (optional): Set to any value to not attempt root access via sudo
349
349
# OUTS: None
350
350
function check_superuser() {
351
- local superuser test_euid
351
+ local superuser
352
352
if [[ $EUID -eq 0 ]]; then
353
353
superuser=true
354
354
elif [[ -z ${1-} ]]; then
@@ -358,6 +358,7 @@ function check_superuser() {
358
358
verbose_print " Sudo: Couldn't acquire credentials ..." \
359
359
" ${fg_red-} "
360
360
else
361
+ local test_euid
361
362
test_euid=" $( sudo -H -- " $BASH " -c ' printf "%s" "$EUID"' ) "
362
363
if [[ $test_euid -eq 0 ]]; then
363
364
superuser=true
@@ -385,9 +386,8 @@ function run_as_root() {
385
386
script_exit ' Missing required argument to run_as_root()!' 2
386
387
fi
387
388
388
- local skip_sudo
389
389
if [[ ${1-} =~ ^0$ ]]; then
390
- skip_sudo=true
390
+ local skip_sudo=true
391
391
shift
392
392
fi
393
393
You can’t perform that action at this time.
0 commit comments