Skip to content

Commit d173a38

Browse files
committed
Add f7d3c51 changes to correct file
1 parent ea90904 commit d173a38

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ function check_binary() {
348348
# ARGS: $1 (optional): Set to any value to not attempt root access via sudo
349349
# OUTS: None
350350
function check_superuser() {
351-
local superuser test_euid
351+
local superuser
352352
if [[ $EUID -eq 0 ]]; then
353353
superuser=true
354354
elif [[ -z ${1-} ]]; then
@@ -358,6 +358,7 @@ function check_superuser() {
358358
verbose_print "Sudo: Couldn't acquire credentials ..." \
359359
"${fg_red-}"
360360
else
361+
local test_euid
361362
test_euid="$(sudo -H -- "$BASH" -c 'printf "%s" "$EUID"')"
362363
if [[ $test_euid -eq 0 ]]; then
363364
superuser=true
@@ -385,9 +386,8 @@ function run_as_root() {
385386
script_exit 'Missing required argument to run_as_root()!' 2
386387
fi
387388

388-
local skip_sudo
389389
if [[ ${1-} =~ ^0$ ]]; then
390-
skip_sudo=true
390+
local skip_sudo=true
391391
shift
392392
fi
393393

0 commit comments

Comments
 (0)